Bug 180957 - Client certificate authentication using webkit2gtk
Summary: Client certificate authentication using webkit2gtk
Status: RESOLVED DUPLICATE of bug 200805
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: Unspecified Linux
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-18 16:32 PST by srujanrk
Modified: 2019-10-30 06:35 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description srujanrk 2017-12-18 16:32:02 PST
I am currently porting my code from webkit1 to webkit2gtk. 
I couldn't find any API to intercept the TLS handshake for handling client certificate request.

In webkit-1, I used to achieve it by using below APIs. 
    soupSession = webkit_get_default_session();
    GetTlsCertInteraction *interaction;
    interaction =
        (GetTlsCertInteraction *)g_object_new (_get_tls_cert_interaction_get_type (), NULL);
    g_object_set (gSoupSession, SOUP_SESSION_TLS_INTERACTION, interaction, NULL);

However in webkit2, the webkit_get_default_session() API is not available anymore. 

Can you please let me know if client certificate authentication supported in webkit2gtk for Linux (Ubuntu 16.04)?
Any pointers on how to achieve this will be of great help.
Comment 1 Adrian Perez 2018-12-01 06:34:41 PST
(In reply to srujanrk from comment #0)
> I am currently porting my code from webkit1 to webkit2gtk. 
> I couldn't find any API to intercept the TLS handshake for handling client
> certificate request.
> 
> In webkit-1, I used to achieve it by using below APIs. 
>     soupSession = webkit_get_default_session();
>     GetTlsCertInteraction *interaction;
>     interaction =
>         (GetTlsCertInteraction *)g_object_new
> (_get_tls_cert_interaction_get_type (), NULL);
>     g_object_set (gSoupSession, SOUP_SESSION_TLS_INTERACTION, interaction,
> NULL);
> 
> However in webkit2, the webkit_get_default_session() API is not available
> anymore. 

This is because of the process split in WebKit2, where fetching content
is done in the WebKitNetworkProcess, which means that the libsoup usage
cannot be directly made in the so called “UI Process” (e.g. a browser)
where the public API is used.

> Can you please let me know if client certificate authentication supported in
> webkit2gtk for Linux (Ubuntu 16.04)?
> Any pointers on how to achieve this will be of great help.

I think what you would need is to watch bug #164509 of which I think
this is a duplicate (but feel free to reopen otherwise).

*** This bug has been marked as a duplicate of bug 164509 ***
Comment 2 Michael Catanzaro 2019-10-30 06:35:01 PDT

*** This bug has been marked as a duplicate of bug 200805 ***