Title: [235276] tags/Safari-607.1.3/Source/WebKit

Diff

Modified: tags/Safari-607.1.3/Source/WebKit/ChangeLog (235275 => 235276)


--- tags/Safari-607.1.3/Source/WebKit/ChangeLog	2018-08-24 06:38:20 UTC (rev 235275)
+++ tags/Safari-607.1.3/Source/WebKit/ChangeLog	2018-08-24 07:27:36 UTC (rev 235276)
@@ -1,5 +1,9 @@
 2018-08-23  Kocsen Chung  <[email protected]>
 
+        Revert r235270. rdar://problem/43667266
+
+2018-08-23  Kocsen Chung  <[email protected]>
+
         Revert r234990. rdar://problem/43667266
 
 2018-08-23  Kocsen Chung  <[email protected]>

Modified: tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkLoad.cpp (235275 => 235276)


--- tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkLoad.cpp	2018-08-24 06:38:20 UTC (rev 235275)
+++ tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkLoad.cpp	2018-08-24 07:27:36 UTC (rev 235276)
@@ -278,13 +278,6 @@
 
     if (!m_task)
         return;
-
-#if PLATFORM(COCOA)
-    if (scheme == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested
-        && NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge))
-        return completionHandler(AuthenticationChallengeDisposition::UseCredential, serverTrustCredential(challenge));
-#endif
-    
     if (auto* pendingDownload = m_task->pendingDownload())
         NetworkProcess::singleton().authenticationManager().didReceiveAuthenticationChallenge(*pendingDownload, *m_challenge, WTFMove(completionHandler));
     else

Modified: tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkSession.cpp (235275 => 235276)


--- tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkSession.cpp	2018-08-24 06:38:20 UTC (rev 235275)
+++ tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkSession.cpp	2018-08-24 07:27:36 UTC (rev 235276)
@@ -79,13 +79,4 @@
         task->invalidateAndCancel();
 }
 
-bool NetworkSession::allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge& challenge)
-{
-#if PLATFORM(COCOA)
-    return NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge);
-#else
-    return false;
-#endif
-}
-
 } // namespace WebKit

Modified: tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkSession.h (235275 => 235276)


--- tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkSession.h	2018-08-24 06:38:20 UTC (rev 235275)
+++ tags/Safari-607.1.3/Source/WebKit/NetworkProcess/NetworkSession.h	2018-08-24 07:27:36 UTC (rev 235276)
@@ -54,8 +54,6 @@
     void registerNetworkDataTask(NetworkDataTask& task) { m_dataTaskSet.add(&task); }
     void unregisterNetworkDataTask(NetworkDataTask& task) { m_dataTaskSet.remove(&task); }
 
-    static bool allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge&);
-
 protected:
     NetworkSession(PAL::SessionID);
 

Modified: tags/Safari-607.1.3/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (235275 => 235276)


--- tags/Safari-607.1.3/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2018-08-24 06:38:20 UTC (rev 235275)
+++ tags/Safari-607.1.3/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2018-08-24 07:27:36 UTC (rev 235276)
@@ -330,13 +330,13 @@
         return;
     }
 
-    // Handle server trust evaluation at platform-level if requested, for performance reasons.
-    if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust] && !NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation()) {
+    if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
         if (NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge))
-            completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
-        else
-            completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil);
-        return;
+            return completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]);
+
+        // Handle server trust evaluation at platform-level if requested, for performance reasons and to use ATS defaults.
+        if (!NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation())
+            return completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil);
     }
 
     if (auto* networkDataTask = [self existingTask:task]) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to