Bug 216822

Summary: [GTK][WPE] Move TLS errors API from WebKitContext to WebKitWebsiteDataManager
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, berto, bugs-noreply, ews-watchlist, gustavo, lmoura
Priority: P2 Keywords: Gtk
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=216911
https://bugs.webkit.org/show_bug.cgi?id=216919
Bug Depends on:    
Bug Blocks: 216041    
Attachments:
Description Flags
Patch none

Description Carlos Garcia Campos 2020-09-22 06:23:52 PDT
Make it per session instead of global to the network process.
Comment 1 Carlos Garcia Campos 2020-09-22 06:59:19 PDT
Created attachment 409358 [details]
Patch
Comment 2 EWS Watchlist 2020-09-22 07:00:04 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Alex Christensen 2020-09-23 14:45:50 PDT
Comment on attachment 409358 [details]
Patch

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

> Source/WebCore/platform/network/soup/SoupNetworkSession.h:82
> +    bool m_ignoreTLSErrors { false };

You may want to have this be consistent with its default value on WebsiteDataStore.
You may also want to have the default be false, but it was true on WebProcessPool so this is maintaining the status quo.
Comment 4 EWS 2020-09-23 15:14:20 PDT
Committed r267502: <https://trac.webkit.org/changeset/267502>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409358 [details].
Comment 5 Lauro Moura 2020-09-23 20:36:53 PDT
GTK and WPE layout test bots are exiting early after this change:

https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r267504%20(16003)/results.html

Maybe something missing in WTR?
Comment 6 Lauro Moura 2020-09-23 20:58:33 PDT
Using http/tests/ssl/verify-ssl-enabled.php (a failure) and enabling logging, the only network request/response that appears is:

set 24 00:52:47 lauro-desktop WebKitNetworkProcess[1575042]: < HTTP/1.1 1 Cancelled
set 24 00:52:47 lauro-desktop WebKitNetworkProcess[1575042]: < Soup-Debug-Timestamp: 1600919567
set 24 00:52:47 lauro-desktop WebKitNetworkProcess[1575042]: < Soup-Debug: SoupMessage 0 (0x563077e470d0)
set 24 00:52:47 lauro-desktop WebKitNetworkProcess[1575042]: 

(Instead of the regular GET request)
Comment 7 Carlos Garcia Campos 2020-09-24 01:01:53 PDT
Comment on attachment 409358 [details]
Patch

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

>> Source/WebCore/platform/network/soup/SoupNetworkSession.h:82
>> +    bool m_ignoreTLSErrors { false };
> 
> You may want to have this be consistent with its default value on WebsiteDataStore.
> You may also want to have the default be false, but it was true on WebProcessPool so this is maintaining the status quo.

The default is false for the GLib API, but true internally so that TLS errors are ignored by default in WTR. But it seems I broke it, see bug #216911