Changeset 234990 in webkit
- Timestamp:
- Aug 17, 2018 11:10:41 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r234989 r234990 1 2018-08-17 Alex Christensen <achristensen@webkit.org> 2 3 Simplify server trust authentication flow 4 https://bugs.webkit.org/show_bug.cgi?id=188684 5 6 Reviewed by Youenn Fablet. 7 8 We unnecessarily had the allowsSpecificHTTPSCertificateForHost check at two different abstraction levels. 9 10 * NetworkProcess/NetworkLoad.cpp: 11 (WebKit::NetworkLoad::didReceiveChallenge): 12 * NetworkProcess/NetworkSession.cpp: 13 (WebKit::NetworkSession::allowsSpecificHTTPSCertificateForHost): Deleted. 14 * NetworkProcess/NetworkSession.h: 15 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 16 (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): 17 1 18 2018-08-17 Alex Christensen <achristensen@webkit.org> 2 19 -
trunk/Source/WebKit/NetworkProcess/NetworkLoad.cpp
r234941 r234990 262 262 return; 263 263 } 264 265 #if PLATFORM(COCOA)266 if (scheme == ProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested267 && NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge))268 return completionHandler(AuthenticationChallengeDisposition::UseCredential, serverTrustCredential(challenge));269 #endif270 264 271 265 if (auto* pendingDownload = m_task->pendingDownload()) -
trunk/Source/WebKit/NetworkProcess/NetworkSession.cpp
r228567 r234990 82 82 } 83 83 84 bool NetworkSession::allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge& challenge)85 {86 #if PLATFORM(COCOA)87 return NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge);88 #else89 return false;90 #endif91 }92 93 84 } // namespace WebKit -
trunk/Source/WebKit/NetworkProcess/NetworkSession.h
r227364 r234990 55 55 void unregisterNetworkDataTask(NetworkDataTask& task) { m_dataTaskSet.remove(&task); } 56 56 57 static bool allowsSpecificHTTPSCertificateForHost(const WebCore::AuthenticationChallenge&);58 59 57 protected: 60 58 NetworkSession(PAL::SessionID); -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r234440 r234990 331 331 } 332 332 333 // Handle server trust evaluation at platform-level if requested, for performance reasons. 334 if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust] && !NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation()) { 333 if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { 335 334 if (NetworkSessionCocoa::allowsSpecificHTTPSCertificateForHost(challenge)) 336 completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]); 337 else 338 completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil); 339 return; 335 return completionHandler(NSURLSessionAuthChallengeUseCredential, [NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust]); 336 337 // Handle server trust evaluation at platform-level if requested, for performance reasons and to use ATS defaults. 338 if (!NetworkProcess::singleton().canHandleHTTPSServerTrustEvaluation()) 339 return completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil); 340 340 } 341 341
Note: See TracChangeset
for help on using the changeset viewer.