Changeset 267088 in webkit
- Timestamp:
- Sep 15, 2020 9:28:33 AM (4 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r267085 r267088 1 2020-09-15 Alex Christensen <achristensen@webkit.org> 2 3 Move WebSocket TLS bypass SPI from WebProcessPool to WebsiteDataStore 4 https://bugs.webkit.org/show_bug.cgi?id=216509 5 6 Reviewed by Youenn Fablet. 7 8 After https://bugs.webkit.org/show_bug.cgi?id=216041 we will be unable to determine which WebsiteDataStore's 9 NetworkProcess to add the TLS bypass to, so we need to move the SPI to the WebsiteDataStore object. This breaks 10 off a piece of that large change into a small, easy-to-review change. 11 12 * UIProcess/API/C/WKContext.cpp: 13 (WKContextSetAllowsAnySSLCertificateForWebSocketTesting): Deleted. 14 * UIProcess/API/C/WKContextPrivate.h: 15 * UIProcess/API/C/WKWebsiteDataStoreRef.cpp: 16 (WKWebsiteDataStoreSetAllowsAnySSLCertificateForWebSocketTesting): 17 * UIProcess/API/C/WKWebsiteDataStoreRef.h: 18 * UIProcess/API/Cocoa/WKProcessPool.mm: 19 (-[WKProcessPool _allowAnyTLSCertificateForWebSocketTesting]): Deleted. 20 * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: 21 * UIProcess/WebProcessPool.cpp: 22 (WebKit::WebProcessPool::setAllowsAnySSLCertificateForWebSocket): Deleted. 23 * UIProcess/WebProcessPool.h: 24 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 25 (WebKit::WebsiteDataStore::setAllowsAnySSLCertificateForWebSocket): 26 * UIProcess/WebsiteData/WebsiteDataStore.h: 27 1 28 2020-09-15 Aditya Keerthi <akeerthi@apple.com> 2 29 -
trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp
r266951 r267088 544 544 } 545 545 546 void WKContextSetAllowsAnySSLCertificateForWebSocketTesting(WKContextRef context, bool allows)547 {548 WebKit::toImpl(context)->setAllowsAnySSLCertificateForWebSocket(allows);549 }550 551 546 void WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting(WKContextRef context, bool allows) 552 547 { -
trunk/Source/WebKit/UIProcess/API/C/WKContextPrivate.h
r266951 r267088 87 87 WK_EXPORT void WKContextTerminateServiceWorkers(WKContextRef); 88 88 89 WK_EXPORT void WKContextSetAllowsAnySSLCertificateForWebSocketTesting(WKContextRef, bool);90 89 WK_EXPORT void WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting(WKContextRef, bool); 91 90 -
trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.cpp
r266829 r267088 133 133 } 134 134 135 void WKWebsiteDataStoreSetAllowsAnySSLCertificateForWebSocketTesting(WKWebsiteDataStoreRef dataStore, bool allows) 136 { 137 WebKit::toImpl(dataStore)->setAllowsAnySSLCertificateForWebSocket(allows); 138 } 139 135 140 void WKWebsiteDataStoreSetResourceLoadStatisticsDebugModeWithCompletionHandler(WKWebsiteDataStoreRef dataStoreRef, bool enable, void* context, WKWebsiteDataStoreStatisticsDebugModeFunction completionHandler) 136 141 { -
trunk/Source/WebKit/UIProcess/API/C/WKWebsiteDataStoreRef.h
r265389 r267088 43 43 44 44 WK_EXPORT WKHTTPCookieStoreRef WKWebsiteDataStoreGetHTTPCookieStore(WKWebsiteDataStoreRef dataStoreRef); 45 46 WK_EXPORT void WKWebsiteDataStoreSetAllowsAnySSLCertificateForWebSocketTesting(WKWebsiteDataStoreRef dataStore, bool allows); 45 47 46 48 WK_EXPORT bool WKWebsiteDataStoreGetResourceLoadStatisticsEnabled(WKWebsiteDataStoreRef dataStoreRef); -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm
r267042 r267088 626 626 } 627 627 628 - (void)_allowAnyTLSCertificateForWebSocketTesting629 {630 _processPool->setAllowsAnySSLCertificateForWebSocket(true);631 }632 633 628 - (void)_seedResourceLoadStatisticsForTestingWithFirstParty:(NSURL *)firstPartyURL thirdParty:(NSURL *)thirdPartyURL shouldScheduleNotification:(BOOL)shouldScheduleNotification completionHandler:(void(^)(void))completionHandler 634 629 { -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h
r267042 r267088 127 127 - (BOOL)_networkProcessHasEntitlementForTesting:(NSString *)entitlement WK_API_AVAILABLE(macos(10.14.4), ios(12.2)); 128 128 - (void)_clearPermanentCredentialsForProtectionSpace:(NSURLProtectionSpace *)protectionSpace WK_API_AVAILABLE(macos(10.15), ios(13.0)); 129 - (void)_allowAnyTLSCertificateForWebSocketTesting WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));130 129 131 130 @property (nonatomic, getter=_isCookieStoragePartitioningEnabled, setter=_setCookieStoragePartitioningEnabled:) BOOL _cookieStoragePartitioningEnabled WK_API_DEPRECATED("Partitioned cookies are no longer supported", macos(10.12.3, 10.14.4), ios(10.3, 12.2)); -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r267042 r267088 1776 1776 } 1777 1777 1778 void WebProcessPool::setAllowsAnySSLCertificateForWebSocket(bool allows)1779 {1780 sendSyncToNetworkingProcess(Messages::NetworkProcess::SetAllowsAnySSLCertificateForWebSocket(allows), Messages::NetworkProcess::SetAllowsAnySSLCertificateForWebSocket::Reply());1781 }1782 1783 1778 void WebProcessPool::clearCachedCredentials() 1784 1779 { -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r267042 r267088 319 319 static Statistics& statistics(); 320 320 321 void setAllowsAnySSLCertificateForWebSocket(bool);322 323 321 void clearCachedCredentials(); 324 322 void terminateNetworkProcess(); -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r267042 r267088 2262 2262 } 2263 2263 2264 void WebsiteDataStore::setAllowsAnySSLCertificateForWebSocket(bool allows) 2265 { 2266 for (auto processPool : WebProcessPool::allProcessPools()) { 2267 if (auto* networkProcess = processPool->networkProcess()) 2268 networkProcess->sendSync(Messages::NetworkProcess::SetAllowsAnySSLCertificateForWebSocket(allows), Messages::NetworkProcess::SetAllowsAnySSLCertificateForWebSocket::Reply(), 0); 2269 } 2270 } 2271 2264 2272 void WebsiteDataStore::dispatchOnQueue(Function<void()>&& function) 2265 2273 { -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
r267042 r267088 241 241 void flushCookies(CompletionHandler<void()>&&); 242 242 243 void setAllowsAnySSLCertificateForWebSocket(bool); 244 243 245 void dispatchOnQueue(Function<void()>&&); 244 246 -
trunk/Tools/ChangeLog
r267083 r267088 1 2020-09-15 Alex Christensen <achristensen@webkit.org> 2 3 Move WebSocket TLS bypass SPI from WebProcessPool to WebsiteDataStore 4 https://bugs.webkit.org/show_bug.cgi?id=216509 5 6 Reviewed by Youenn Fablet. 7 8 * WebKitTestRunner/TestController.cpp: 9 (WTR::TestController::setAllowsAnySSLCertificate): 10 * WebKitTestRunner/cocoa/TestControllerCocoa.mm: 11 (WTR::TestController::setAllowsAnySSLCertificate): 12 1 13 2020-09-15 Rob Buis <rbuis@igalia.com> 2 14 -
trunk/Tools/WebKitTestRunner/TestController.cpp
r267083 r267088 1329 1329 { 1330 1330 m_allowsAnySSLCertificate = allows; 1331 WK ContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows);1331 WKWebsiteDataStoreSetAllowsAnySSLCertificateForWebSocketTesting(websiteDataStore(), allows); 1332 1332 } 1333 1333 #endif -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r266342 r267088 452 452 { 453 453 m_allowsAnySSLCertificate = allows; 454 WK ContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows);454 WKWebsiteDataStoreSetAllowsAnySSLCertificateForWebSocketTesting(websiteDataStore(), allows); 455 455 [globalWebsiteDataStoreDelegateClient setAllowAnySSLCertificate: allows]; 456 456 }
Note: See TracChangeset
for help on using the changeset viewer.