Title: [260497] trunk

Diff

Modified: trunk/Source/WebKit/ChangeLog (260496 => 260497)


--- trunk/Source/WebKit/ChangeLog	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/ChangeLog	2020-04-22 03:58:34 UTC (rev 260497)
@@ -1,5 +1,18 @@
 2020-04-21  Ryan Haddad  <ryanhad...@apple.com>
 
+        Unreviewed, reverting r260410.
+
+        Caused crashes in Safari
+
+        Reverted changeset:
+
+        "SPI clients using fastServerTrustEvaluationEnabled need SPI
+        to inform them of modern TLS negotiation"
+        https://bugs.webkit.org/show_bug.cgi?id=210533
+        https://trac.webkit.org/changeset/260410
+
+2020-04-21  Ryan Haddad  <ryanhad...@apple.com>
+
         Unreviewed, reverting r260475.
 
         New assert caused layout tests to exit early on iOS and macOS

Modified: trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h (260496 => 260497)


--- trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/NetworkProcess/NetworkDataTask.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -72,8 +72,6 @@
 
     virtual bool shouldCaptureExtraNetworkLoadMetrics() const { return false; }
 
-    virtual void didNegotiateModernTLS(const WebCore::AuthenticationChallenge&) { }
-
     void didCompleteWithError(const WebCore::ResourceError& error)
     {
         WebCore::NetworkLoadMetrics emptyMetrics;

Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp (260496 => 260497)


--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp	2020-04-22 03:58:34 UTC (rev 260497)
@@ -30,7 +30,6 @@
 #include "AuthenticationManager.h"
 #include "NetworkDataTaskBlob.h"
 #include "NetworkProcess.h"
-#include "NetworkProcessProxyMessages.h"
 #include "NetworkSession.h"
 #include "WebErrors.h"
 #include <WebCore/ResourceRequest.h>
@@ -286,11 +285,6 @@
     m_client.get().didFailLoading(wasBlockedByRestrictionsError(m_currentRequest));
 }
 
-void NetworkLoad::didNegotiateModernTLS(const WebCore::AuthenticationChallenge& challenge)
-{
-    m_networkProcess->send(Messages::NetworkProcessProxy::DidNegotiateModernTLS(m_parameters.webPageProxyID, challenge));
-}
-
 String NetworkLoad::description() const
 {
     if (m_task.get())

Modified: trunk/Source/WebKit/NetworkProcess/NetworkLoad.h (260496 => 260497)


--- trunk/Source/WebKit/NetworkProcess/NetworkLoad.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/NetworkProcess/NetworkLoad.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -81,7 +81,6 @@
     void wasBlocked() final;
     void cannotShowURL() final;
     void wasBlockedByRestrictions() final;
-    void didNegotiateModernTLS(const WebCore::AuthenticationChallenge&) final;
 
     void notifyDidReceiveResponse(WebCore::ResourceResponse&&, NegotiatedLegacyTLS, ResponseCompletionHandler&&);
     void throttleDelayCompleted();

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h (260496 => 260497)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -53,7 +53,6 @@
 
     void didSendData(uint64_t totalBytesSent, uint64_t totalBytesExpectedToSend);
     void didReceiveChallenge(WebCore::AuthenticationChallenge&&, NegotiatedLegacyTLS, ChallengeCompletionHandler&&);
-    void didNegotiateModernTLS(const WebCore::AuthenticationChallenge&);
     void didCompleteWithError(const WebCore::ResourceError&, const WebCore::NetworkLoadMetrics&);
     void didReceiveResponse(WebCore::ResourceResponse&&, NegotiatedLegacyTLS, ResponseCompletionHandler&&);
     void didReceiveData(Ref<WebCore::SharedBuffer>&&);

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm (260496 => 260497)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm	2020-04-22 03:58:34 UTC (rev 260497)
@@ -318,12 +318,6 @@
     }
 }
 
-void NetworkDataTaskCocoa::didNegotiateModernTLS(const WebCore::AuthenticationChallenge& challenge)
-{
-    if (m_client)
-        m_client->didNegotiateModernTLS(challenge);
-}
-
 void NetworkDataTaskCocoa::didCompleteWithError(const WebCore::ResourceError& error, const WebCore::NetworkLoadMetrics& networkLoadMetrics)
 {
     if (error.isNull())

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (260496 => 260497)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2020-04-22 03:58:34 UTC (rev 260497)
@@ -674,10 +674,8 @@
 
         // Handle server trust evaluation at platform-level if requested, for performance reasons and to use ATS defaults.
         if (sessionCocoa->fastServerTrustEvaluationEnabled() && negotiatedLegacyTLS == NegotiatedLegacyTLS::No) {
+#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
             auto* networkDataTask = [self existingTask:task];
-            if (networkDataTask)
-                networkDataTask->didNegotiateModernTLS(challenge);
-#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
             auto decisionHandler = makeBlockPtr([weakSelf = WeakObjCPtr<WKNetworkSessionDelegate>(self), sessionCocoa = makeWeakPtr(sessionCocoa), completionHandler = makeBlockPtr(completionHandler), taskIdentifier, networkDataTask = makeRefPtr(networkDataTask), negotiatedLegacyTLS](NSURLAuthenticationChallenge *challenge, OSStatus trustResult) mutable {
                 auto strongSelf = weakSelf.get();
                 if (!strongSelf)

Modified: trunk/Source/WebKit/UIProcess/API/APINavigationClient.h (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/API/APINavigationClient.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/API/APINavigationClient.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -102,7 +102,6 @@
 
     virtual void didReceiveAuthenticationChallenge(WebKit::WebPageProxy&, WebKit::AuthenticationChallengeProxy& challenge) { challenge.listener().completeChallenge(WebKit::AuthenticationChallengeDisposition::PerformDefaultHandling); }
     virtual void shouldAllowLegacyTLS(WebKit::WebPageProxy&, WebKit::AuthenticationChallengeProxy&, CompletionHandler<void(bool)>&& completionHandler) { completionHandler(true); }
-    virtual void didNegotiateModernTLS(const WebCore::AuthenticationChallenge&) { }
     virtual bool shouldBypassContentModeSafeguards() const { return false; }
 
     // FIXME: These function should not be part of this client.

Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -86,7 +86,6 @@
 - (NSData *)_webCryptoMasterKeyForWebView:(WKWebView *)webView;
 
 - (void)_webView:(WKWebView *)webView authenticationChallenge:(NSURLAuthenticationChallenge *)challenge shouldAllowLegacyTLS:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
-- (void)_webView:(WKWebView *)webView didNegotiateModernTLS:(NSURLAuthenticationChallenge *)challenge WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
 
 - (void)_webViewDidBeginNavigationGesture:(WKWebView *)webView;
 // Item is nil if the gesture ended without navigation.

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -117,7 +117,6 @@
 
         void didReceiveAuthenticationChallenge(WebPageProxy&, AuthenticationChallengeProxy&) override;
         void shouldAllowLegacyTLS(WebPageProxy&, AuthenticationChallengeProxy&, CompletionHandler<void(bool)>&&) final;
-        void didNegotiateModernTLS(const WebCore::AuthenticationChallenge&) final;
         bool processDidTerminate(WebPageProxy&, ProcessTerminationReason) override;
         void processDidBecomeResponsive(WebPageProxy&) override;
         void processDidBecomeUnresponsive(WebPageProxy&) override;
@@ -230,7 +229,6 @@
         bool webViewRenderingProgressDidChange : 1;
         bool webViewDidReceiveAuthenticationChallengeCompletionHandler : 1;
         bool webViewAuthenticationChallengeShouldAllowLegacyTLS : 1;
-        bool webViewDidNegotiateModernTLS : 1;
         bool webViewWebContentProcessDidTerminate : 1;
         bool webViewWebContentProcessDidTerminateWithReason : 1;
         bool webViewWebProcessDidCrash : 1;

Modified: trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/Cocoa/NavigationState.mm	2020-04-22 03:58:34 UTC (rev 260497)
@@ -70,7 +70,6 @@
 #import "_WKRenderingProgressEventsInternal.h"
 #import "_WKSameDocumentNavigationTypeInternal.h"
 #import "_WKWebsitePoliciesInternal.h"
-#import <WebCore/AuthenticationMac.h>
 #import <WebCore/ContentRuleListResults.h>
 #import <WebCore/Credential.h>
 #import <WebCore/SSLKeyGenerator.h>
@@ -179,7 +178,6 @@
     m_navigationDelegateMethods.webViewRenderingProgressDidChange = [delegate respondsToSelector:@selector(_webView:renderingProgressDidChange:)];
     m_navigationDelegateMethods.webViewDidReceiveAuthenticationChallengeCompletionHandler = [delegate respondsToSelector:@selector(webView:didReceiveAuthenticationChallenge:completionHandler:)];
     m_navigationDelegateMethods.webViewAuthenticationChallengeShouldAllowLegacyTLS = [delegate respondsToSelector:@selector(_webView:authenticationChallenge:shouldAllowLegacyTLS:)];
-    m_navigationDelegateMethods.webViewDidNegotiateModernTLS = [delegate respondsToSelector:@selector(_webView:didNegotiateModernTLS:)];
     m_navigationDelegateMethods.webViewWebContentProcessDidTerminate = [delegate respondsToSelector:@selector(webViewWebContentProcessDidTerminate:)];
     m_navigationDelegateMethods.webViewWebContentProcessDidTerminateWithReason = [delegate respondsToSelector:@selector(_webView:webContentProcessDidTerminateWithReason:)];
     m_navigationDelegateMethods.webViewWebProcessDidCrash = [delegate respondsToSelector:@selector(_webViewWebProcessDidCrash:)];
@@ -1048,18 +1046,6 @@
     }).get()];
 }
 
-void NavigationState::NavigationClient::didNegotiateModernTLS(const WebCore::AuthenticationChallenge& challenge)
-{
-    if (!m_navigationState.m_navigationDelegateMethods.webViewDidNegotiateModernTLS)
-        return;
-
-    auto navigationDelegate = m_navigationState.m_navigationDelegate.get();
-    if (!navigationDelegate)
-        return;
-
-    [static_cast<id <WKNavigationDelegatePrivate>>(navigationDelegate.get()) _webView:m_navigationState.m_webView didNegotiateModernTLS:mac(challenge)];
-}
-
 static _WKProcessTerminationReason wkProcessTerminationReason(ProcessTerminationReason reason)
 {
     switch (reason) {

Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2020-04-22 03:58:34 UTC (rev 260497)
@@ -344,12 +344,6 @@
         page->negotiatedLegacyTLS();
 }
 
-void NetworkProcessProxy::didNegotiateModernTLS(WebPageProxyIdentifier pageID, const WebCore::AuthenticationChallenge& challenge)
-{
-    if (auto* page = pageID ? WebProcessProxy::webPage(pageID) : nullptr)
-        page->didNegotiateModernTLS(challenge);
-}
-
 void NetworkProcessProxy::didFetchWebsiteData(CallbackID callbackID, const WebsiteData& websiteData)
 {
     MESSAGE_CHECK(m_pendingFetchWebsiteDataCallbacks.isValidKey(callbackID));

Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -251,7 +251,6 @@
     void didReceiveNetworkProcessProxyMessage(IPC::Connection&, IPC::Decoder&);
     void didReceiveAuthenticationChallenge(PAL::SessionID, WebPageProxyIdentifier, const Optional<WebCore::SecurityOriginData>&, WebCore::AuthenticationChallenge&&, bool, uint64_t challengeID);
     void negotiatedLegacyTLS(WebPageProxyIdentifier);
-    void didNegotiateModernTLS(WebPageProxyIdentifier, const WebCore::AuthenticationChallenge&);
     void didFetchWebsiteData(CallbackID, const WebsiteData&);
     void didDeleteWebsiteData(CallbackID);
     void didDeleteWebsiteDataForOrigins(CallbackID);

Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in	2020-04-22 03:58:34 UTC (rev 260497)
@@ -23,7 +23,6 @@
 messages -> NetworkProcessProxy LegacyReceiver NotRefCounted {
     DidReceiveAuthenticationChallenge(PAL::SessionID sessionID, WebKit::WebPageProxyIdentifier pageID, Optional<WebCore::SecurityOriginData> topOrigin, WebCore::AuthenticationChallenge challenge, bool negotiatedLegacyTLS, uint64_t challengeID)
     NegotiatedLegacyTLS(WebKit::WebPageProxyIdentifier pageID)
-    DidNegotiateModernTLS(WebKit::WebPageProxyIdentifier pageID, WebCore::AuthenticationChallenge challenge)
 
     DidFetchWebsiteData(WebKit::CallbackID callbackID, struct WebKit::WebsiteData websiteData)
     DidDeleteWebsiteData(WebKit::CallbackID callbackID)

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2020-04-22 03:58:34 UTC (rev 260497)
@@ -7940,11 +7940,6 @@
     m_pageLoadState.negotiatedLegacyTLS(transaction);
 }
 
-void WebPageProxy::didNegotiateModernTLS(const WebCore::AuthenticationChallenge& challenge)
-{
-    m_navigationClient->didNegotiateModernTLS(challenge);
-}
-
 void WebPageProxy::exceededDatabaseQuota(FrameIdentifier frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, Messages::WebPageProxy::ExceededDatabaseQuota::DelayedReply&& reply)
 {
     requestStorageSpace(frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, [reply = WTFMove(reply)](auto quota) mutable {

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (260496 => 260497)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.h	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h	2020-04-22 03:58:34 UTC (rev 260497)
@@ -1369,7 +1369,6 @@
 
     void didReceiveAuthenticationChallengeProxy(Ref<AuthenticationChallengeProxy>&&, NegotiatedLegacyTLS);
     void negotiatedLegacyTLS();
-    void didNegotiateModernTLS(const WebCore::AuthenticationChallenge&);
 
     SpellDocumentTag spellDocumentTag();
 

Modified: trunk/Tools/ChangeLog (260496 => 260497)


--- trunk/Tools/ChangeLog	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Tools/ChangeLog	2020-04-22 03:58:34 UTC (rev 260497)
@@ -1,3 +1,16 @@
+2020-04-21  Ryan Haddad  <ryanhad...@apple.com>
+
+        Unreviewed, reverting r260410.
+
+        Caused crashes in Safari
+
+        Reverted changeset:
+
+        "SPI clients using fastServerTrustEvaluationEnabled need SPI
+        to inform them of modern TLS negotiation"
+        https://bugs.webkit.org/show_bug.cgi?id=210533
+        https://trac.webkit.org/changeset/260410
+
 2020-04-21  Cathie Chen  <cathiec...@igalia.com>
 
         REGRESSION (r254790): No longer get smooth scrolling on music.apple.com

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm (260496 => 260497)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm	2020-04-22 03:53:00 UTC (rev 260496)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm	2020-04-22 03:58:34 UTC (rev 260497)
@@ -73,7 +73,6 @@
 @interface TLSNavigationDelegate : NSObject <WKNavigationDelegate>
 - (void)waitForDidFinishNavigation;
 - (void)waitForDidFailProvisionalNavigation;
-- (NSURLAuthenticationChallenge *)waitForDidNegotiateModernTLS;
 - (bool)receivedShouldAllowLegacyTLS;
 @property (nonatomic) bool shouldAllowLegacyTLS;
 @end
@@ -82,7 +81,6 @@
     bool _navigationFinished;
     bool _navigationFailed;
     bool _receivedShouldAllowLegacyTLS;
-    RetainPtr<NSURLAuthenticationChallenge> _negotiatedModernTLS;
 }
 
 - (void)waitForDidFinishNavigation
@@ -97,13 +95,6 @@
         TestWebKitAPI::Util::spinRunLoop();
 }
 
-- (NSURLAuthenticationChallenge *)waitForDidNegotiateModernTLS
-{
-    while (!_negotiatedModernTLS)
-        TestWebKitAPI::Util::spinRunLoop();
-    return _negotiatedModernTLS.autorelease();
-}
-
 - (bool)receivedShouldAllowLegacyTLS
 {
     return _receivedShouldAllowLegacyTLS;
@@ -131,11 +122,6 @@
     completionHandler([self shouldAllowLegacyTLS]);
 }
 
-- (void)_webView:(WKWebView *)webView didNegotiateModernTLS:(NSURLAuthenticationChallenge *)challenge
-{
-    _negotiatedModernTLS = challenge;
-}
-
 @end
 
 
@@ -383,25 +369,6 @@
     [webView removeObserver:observer.get() forKeyPath:@"_negotiatedLegacyTLS"];
 }
 
-TEST(TLSVersion, DidNegotiateModernTLS)
-{
-    HTTPServer server({
-        { "/", { "hello" }}
-    }, HTTPServer::Protocol::Https);
-
-    auto delegate = adoptNS([TLSNavigationDelegate new]);
-    auto configuration = adoptNS([WKWebViewConfiguration new]);
-    auto dataStoreConfiguration = adoptNS([_WKWebsiteDataStoreConfiguration new]);
-    [dataStoreConfiguration setFastServerTrustEvaluationEnabled:YES];
-    [configuration setWebsiteDataStore:[[[WKWebsiteDataStore alloc] _initWithConfiguration:dataStoreConfiguration.get()] autorelease]];
-    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-    [webView setNavigationDelegate:delegate.get()];
-    [webView loadRequest:server.request()];
-    NSURLAuthenticationChallenge *challenge = [delegate waitForDidNegotiateModernTLS];
-    EXPECT_WK_STREQ(challenge.protectionSpace.host, "127.0.0.1");
-    EXPECT_EQ(challenge.protectionSpace.port, server.port());
-}
-
 TEST(TLSVersion, BackForwardHasOnlySecureContent)
 {
     HTTPServer secureServer({
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to