Bug 125490 - [WK2][SOUP] initialise the Network Process with ignoreTLSErrors
: [WK2][SOUP] initialise the Network Process with ignoreTLSErrors
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: WebKit2
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Brian Holt
:
Depends on:
Blocks: 108832
  Show dependency treegraph
 
Reported: 2013-12-10 03:26 PST by Brian Holt
Modified: 2013-12-10 05:50 PST (History)
10 users (show)

See Also:


Attachments
Patch (7.16 KB, patch)
2013-12-10 03:30 PST, Brian Holt
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Holt 2013-12-10 03:26:34 PST
GTester: last random seed: R02S69550582c8e7a89f180d326b5b541b32
TEST: Programs/WebKit2APITests/TestSSL... (pid=1381)
Gtk-Message: Failed to load module "canberra-gtk-module"
  /webkit2/WebKitWebView/ssl:                                          **
ERROR:../../Source/WebKit2/UIProcess/API/gtk/tests/TestSSL.cpp:72:void testSSL(SSLTest*, gconstpointer): assertion failed: (test->m_certificate)
FAIL

The problem is that the ResourceHandleSoup in the Network Process and is not initialised with a policy on ignoring TLS errors.  This simply requires that the appropriate message is created for the Network Process and the parameter created for initialisation.
Comment 1 Brian Holt 2013-12-10 03:30:18 PST
Created attachment 218849 [details]
Patch
Comment 2 Gustavo Noronha (kov) 2013-12-10 03:50:34 PST
Comment on attachment 218849 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218849&action=review

> Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp:104
> -    parameters.ignoreTLSErrors = m_ignoreTLSErrors;
>      parameters.shouldTrackVisitedLinks = true;
>  #if ENABLE(NETWORK_PROCESS)
>      parameters.usesNetworkProcess = true;
> +#else
> +    parameters.ignoreTLSErrors = m_ignoreTLSErrors;

Looks good to me, pretty sure we'll need this for cookieAcceptPolicy and others as well, maybe we should do the others in one go?
Comment 3 Kwang Yul Seo 2013-12-10 03:57:32 PST
ignoreTLSErrors can be dynamically set, so WebContext::setIgnoreTLSErrors must be changed to send the message to the network process when network process is enabled.

void WebContext::setIgnoreTLSErrors(bool ignoreTLSErrors)
{
    m_ignoreTLSErrors = ignoreTLSErrors;
    sendToAllProcesses(Messages::WebProcess::SetIgnoreTLSErrors(m_ignoreTLSErrors));
}
Comment 4 Sergio Villar Senin 2013-12-10 04:04:28 PST
(In reply to comment #3)
> ignoreTLSErrors can be dynamically set, so WebContext::setIgnoreTLSErrors must be changed to send the message to the network process when network process is enabled.
> 
> void WebContext::setIgnoreTLSErrors(bool ignoreTLSErrors)
> {
>     m_ignoreTLSErrors = ignoreTLSErrors;
>     sendToAllProcesses(Messages::WebProcess::SetIgnoreTLSErrors(m_ignoreTLSErrors));
> }

Note that this will send the message to all the WebProcesses but not to the network process.
Comment 5 WebKit Commit Bot 2013-12-10 04:18:01 PST
Comment on attachment 218849 [details]
Patch

Clearing flags on attachment: 218849

Committed r160355: <http://trac.webkit.org/changeset/160355>
Comment 6 WebKit Commit Bot 2013-12-10 04:18:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Kwang Yul Seo 2013-12-10 05:50:52 PST
(In reply to comment #4)
> Note that this will send the message to all the WebProcesses but not to the network process.

I field a separate bug for this. See Bug 125505