Diff
Modified: branches/safari-609-branch/Source/WebKit/ChangeLog (254612 => 254613)
--- branches/safari-609-branch/Source/WebKit/ChangeLog 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Source/WebKit/ChangeLog 2020-01-15 19:15:55 UTC (rev 254613)
@@ -1,5 +1,61 @@
2020-01-14 Alan Coon <alanc...@apple.com>
+ Cherry-pick r254344. rdar://problem/58559189
+
+ Add SPI to enable TLS 1.0 and 1.1 in WKWebViews
+ https://bugs.webkit.org/show_bug.cgi?id=206046
+
+ Patch by Alex Christensen <achristen...@webkit.org> on 2020-01-10
+ Reviewed by Youenn Fablet.
+
+ Source/WebKit:
+
+ This is needed for <rdar://problem/58464912>
+ Covered by API tests.
+
+ * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
+ * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
+ (-[_WKWebsiteDataStoreConfiguration legacyTLSEnabled]):
+ (-[_WKWebsiteDataStoreConfiguration setLegacyTLSEnabled:]):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+ * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
+ (WebKit::WebsiteDataStoreConfiguration::copy const):
+ * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
+ (WebKit::WebsiteDataStoreConfiguration::legacyTLSEnabled const):
+ (WebKit::WebsiteDataStoreConfiguration::setLegacyTLSEnabled):
+
+ Tools:
+
+ * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
+ (TestWebKitAPI::TEST):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-10 Alex Christensen <achristen...@webkit.org>
+
+ Add SPI to enable TLS 1.0 and 1.1 in WKWebViews
+ https://bugs.webkit.org/show_bug.cgi?id=206046
+
+ Reviewed by Youenn Fablet.
+
+ This is needed for <rdar://problem/58464912>
+ Covered by API tests.
+
+ * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
+ * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
+ (-[_WKWebsiteDataStoreConfiguration legacyTLSEnabled]):
+ (-[_WKWebsiteDataStoreConfiguration setLegacyTLSEnabled:]):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+ * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
+ (WebKit::WebsiteDataStoreConfiguration::copy const):
+ * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
+ (WebKit::WebsiteDataStoreConfiguration::legacyTLSEnabled const):
+ (WebKit::WebsiteDataStoreConfiguration::setLegacyTLSEnabled):
+
+2020-01-14 Alan Coon <alanc...@apple.com>
+
Cherry-pick r254310. rdar://problem/58552856
Check the existence of the optional m_sessionID before using it in WebProcess::setResourceLoadStatisticsEnabled()
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h (254612 => 254613)
--- branches/safari-609-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h 2020-01-15 19:15:55 UTC (rev 254613)
@@ -48,6 +48,7 @@
@property (nonatomic) NSUInteger perOriginStorageQuota WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, nullable, copy) NSString *boundInterfaceIdentifier WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic) BOOL allowsCellularAccess WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
+@property (nonatomic) BOOL legacyTLSEnabled WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, nullable, copy) NSDictionary *proxyConfiguration WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
@property (nonatomic, nullable, copy) NSString *dataConnectionServiceType WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm (254612 => 254613)
--- branches/safari-609-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm 2020-01-15 19:15:55 UTC (rev 254613)
@@ -380,6 +380,16 @@
_configuration->setAllowsCellularAccess(allows);
}
+- (BOOL)legacyTLSEnabled
+{
+ return _configuration->legacyTLSEnabled();
+}
+
+- (void)setLegacyTLSEnabled:(BOOL)enable
+{
+ _configuration->setLegacyTLSEnabled(enable);
+}
+
- (NSDictionary *)proxyConfiguration
{
return (__bridge NSDictionary *)_configuration->proxyConfiguration();
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (254612 => 254613)
--- branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2020-01-15 19:15:55 UTC (rev 254613)
@@ -74,7 +74,7 @@
bool enableResourceLoadStatisticsDebugMode = false;
auto thirdPartyCookieBlockingMode = WebCore::ThirdPartyCookieBlockingMode::All;
auto firstPartyWebsiteDataRemovalMode = WebCore::FirstPartyWebsiteDataRemovalMode::AllButCookies;
- bool enableLegacyTLS = false;
+ bool enableLegacyTLS = configuration().legacyTLSEnabled();
if (id value = [defaults objectForKey:@"WebKitEnableLegacyTLS"])
enableLegacyTLS = [value boolValue];
if (!enableLegacyTLS) {
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp (254612 => 254613)
--- branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp 2020-01-15 19:15:55 UTC (rev 254613)
@@ -83,6 +83,7 @@
copy->m_allLoadsBlockedByDeviceManagementRestrictionsForTesting = this->m_allLoadsBlockedByDeviceManagementRestrictionsForTesting;
copy->m_boundInterfaceIdentifier = this->m_boundInterfaceIdentifier;
copy->m_allowsCellularAccess = this->m_allowsCellularAccess;
+ copy->m_legacyTLSEnabled = this->m_legacyTLSEnabled;
copy->m_dataConnectionServiceType = this->m_dataConnectionServiceType;
copy->m_testingSessionEnabled = this->m_testingSessionEnabled;
copy->m_testSpeedMultiplier = this->m_testSpeedMultiplier;
Modified: branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h (254612 => 254613)
--- branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h 2020-01-15 19:15:55 UTC (rev 254613)
@@ -76,6 +76,9 @@
bool allowsCellularAccess() const { return m_allowsCellularAccess; }
void setAllowsCellularAccess(bool allows) { m_allowsCellularAccess = allows; }
+ bool legacyTLSEnabled() const { return m_legacyTLSEnabled; }
+ void setLegacyTLSEnabled(bool enabled) { m_legacyTLSEnabled = enabled; }
+
bool fastServerTrustEvaluationEnabled() const { return m_fastServerTrustEvaluationEnabled; }
void setFastServerTrustEvaluationEnabled(bool enabled) { m_fastServerTrustEvaluationEnabled = enabled; }
@@ -181,6 +184,7 @@
bool m_deviceManagementRestrictionsEnabled { false };
bool m_allLoadsBlockedByDeviceManagementRestrictionsForTesting { false };
bool m_allowsCellularAccess { true };
+ bool m_legacyTLSEnabled { false };
bool m_fastServerTrustEvaluationEnabled { false };
bool m_serviceWorkerProcessTerminationDelayEnabled { true };
bool m_testingSessionEnabled { false };
Modified: branches/safari-609-branch/Tools/ChangeLog (254612 => 254613)
--- branches/safari-609-branch/Tools/ChangeLog 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Tools/ChangeLog 2020-01-15 19:15:55 UTC (rev 254613)
@@ -1,5 +1,49 @@
2020-01-14 Alan Coon <alanc...@apple.com>
+ Cherry-pick r254344. rdar://problem/58559189
+
+ Add SPI to enable TLS 1.0 and 1.1 in WKWebViews
+ https://bugs.webkit.org/show_bug.cgi?id=206046
+
+ Patch by Alex Christensen <achristen...@webkit.org> on 2020-01-10
+ Reviewed by Youenn Fablet.
+
+ Source/WebKit:
+
+ This is needed for <rdar://problem/58464912>
+ Covered by API tests.
+
+ * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
+ * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
+ (-[_WKWebsiteDataStoreConfiguration legacyTLSEnabled]):
+ (-[_WKWebsiteDataStoreConfiguration setLegacyTLSEnabled:]):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+ * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
+ (WebKit::WebsiteDataStoreConfiguration::copy const):
+ * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
+ (WebKit::WebsiteDataStoreConfiguration::legacyTLSEnabled const):
+ (WebKit::WebsiteDataStoreConfiguration::setLegacyTLSEnabled):
+
+ Tools:
+
+ * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
+ (TestWebKitAPI::TEST):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254344 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-01-10 Alex Christensen <achristen...@webkit.org>
+
+ Add SPI to enable TLS 1.0 and 1.1 in WKWebViews
+ https://bugs.webkit.org/show_bug.cgi?id=206046
+
+ Reviewed by Youenn Fablet.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm:
+ (TestWebKitAPI::TEST):
+
+2020-01-14 Alan Coon <alanc...@apple.com>
+
Cherry-pick r254254. rdar://problem/58548978
WebKitTestRunner leaks objects in a top-level autoreleasePool that's never cleared
Modified: branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm (254612 => 254613)
--- branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm 2020-01-15 19:15:51 UTC (rev 254612)
+++ branches/safari-609-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/TLSDeprecation.mm 2020-01-15 19:15:55 UTC (rev 254613)
@@ -33,7 +33,9 @@
#import "TestWKWebView.h"
#import "WebCoreTestSupport.h"
#import <WebKit/WKProcessPoolPrivate.h>
+#import <WebKit/WKWebsiteDataStorePrivate.h>
#import <WebKit/WebKit.h>
+#import <WebKit/_WKWebsiteDataStoreConfiguration.h>
#import <wtf/RetainPtr.h>
#if PLATFORM(IOS_FAMILY)
@@ -195,6 +197,15 @@
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]];
[delegate waitForDidFailProvisionalNavigation];
}
+ {
+ TCPServer server(TCPServer::Protocol::HTTPS, TCPServer::respondWithOK, tls1_1);
+ auto configuration = adoptNS([[_WKWebsiteDataStoreConfiguration alloc] initNonPersistentConfiguration]);
+ [configuration setLegacyTLSEnabled:YES];
+ auto dataStore = adoptNS([[WKWebsiteDataStore alloc] _initWithConfiguration:configuration.get()]);
+ auto webView = makeWebViewWith(dataStore.get());
+ [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://127.0.0.1:%d/", server.port()]]]];
+ [delegate waitForDidFinishNavigation];
+ }
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:defaultsKey];
{
TCPServer server(TCPServer::Protocol::HTTPS, [](SSL *ssl) {