Log Message
Disable legacy TLS versions and add a temporary default to re-enable it https://bugs.webkit.org/show_bug.cgi?id=200945
Patch by Alex Christensen <[email protected]> on 2019-08-22 Reviewed by Brady Eidson. Source/WebKit: * NetworkProcess/NetworkSessionCreationParameters.cpp: (WebKit::NetworkSessionCreationParameters::privateSessionParameters): (WebKit::NetworkSessionCreationParameters::encode const): (WebKit::NetworkSessionCreationParameters::decode): * NetworkProcess/NetworkSessionCreationParameters.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): * UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeNetworkProcess): * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::WebsiteDataStore::parameters): Source/WTF: * wtf/Platform.h:
Modified Paths
- trunk/Source/WTF/ChangeLog
- trunk/Source/WTF/wtf/Platform.h
- trunk/Source/WebKit/ChangeLog
- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp
- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
Diff
Modified: trunk/Source/WTF/ChangeLog (249018 => 249019)
--- trunk/Source/WTF/ChangeLog 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WTF/ChangeLog 2019-08-22 18:13:08 UTC (rev 249019)
@@ -1,3 +1,12 @@
+2019-08-22 Alex Christensen <[email protected]>
+
+ Disable legacy TLS versions and add a temporary default to re-enable it
+ https://bugs.webkit.org/show_bug.cgi?id=200945
+
+ Reviewed by Brady Eidson.
+
+ * wtf/Platform.h:
+
2019-08-22 Darin Adler <[email protected]>
Rename StringBuilder functions to avoid unclear "append uninitialized" terminology
Modified: trunk/Source/WTF/wtf/Platform.h (249018 => 249019)
--- trunk/Source/WTF/wtf/Platform.h 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WTF/wtf/Platform.h 2019-08-22 18:13:08 UTC (rev 249019)
@@ -1609,6 +1609,10 @@
#define HAVE_APP_SSO 1
#endif
+#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000 || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
+#define HAVE_TLS_PROTOCOL_VERSION_T 1
+#endif
+
#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
#define USE_UICONTEXTMENU 1
#endif
Modified: trunk/Source/WebKit/ChangeLog (249018 => 249019)
--- trunk/Source/WebKit/ChangeLog 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WebKit/ChangeLog 2019-08-22 18:13:08 UTC (rev 249019)
@@ -1,3 +1,22 @@
+2019-08-22 Alex Christensen <[email protected]>
+
+ Disable legacy TLS versions and add a temporary default to re-enable it
+ https://bugs.webkit.org/show_bug.cgi?id=200945
+
+ Reviewed by Brady Eidson.
+
+ * NetworkProcess/NetworkSessionCreationParameters.cpp:
+ (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
+ (WebKit::NetworkSessionCreationParameters::encode const):
+ (WebKit::NetworkSessionCreationParameters::decode):
+ * NetworkProcess/NetworkSessionCreationParameters.h:
+ * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+ (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::WebProcessPool::platformInitializeNetworkProcess):
+ * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+ (WebKit::WebsiteDataStore::parameters):
+
2019-08-17 Darin Adler <[email protected]>
Use makeString and multi-argument StringBuilder::append instead of less efficient multiple appends
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp (249018 => 249019)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp 2019-08-22 18:13:08 UTC (rev 249019)
@@ -40,17 +40,41 @@
NetworkSessionCreationParameters NetworkSessionCreationParameters::privateSessionParameters(const PAL::SessionID& sessionID)
{
- return { sessionID, { }, AllowsCellularAccess::Yes
+ return {
+ sessionID
+ , { }
+ , AllowsCellularAccess::Yes
#if PLATFORM(COCOA)
- , { }, { }, { }, AllowsTLSFallback::Yes, false, { }, { }, { }
+ , { }
+ , { }
+ , { }
+ , AllowsTLSFallback::Yes
+ , false
+ , { }
+ , { }
+ , { }
+ , false
#endif
#if USE(SOUP)
- , { }, SoupCookiePersistentStorageType::Text
+ , { }
+ , SoupCookiePersistentStorageType::Text
#endif
#if USE(CURL)
- , { }, { }
+ , { }
+ , { }
#endif
- , { }, { }, false, false, { }, { }, { }, { }, { }, { }, { }, { }
+ , { }
+ , { }
+ , false
+ , false
+ , { }
+ , { }
+ , { }
+ , { }
+ , { }
+ , { }
+ , { }
+ , { }
};
}
@@ -68,6 +92,7 @@
encoder << loadThrottleLatency;
encoder << httpProxy;
encoder << httpsProxy;
+ encoder << enableLegacyTLS;
#endif
#if USE(SOUP)
encoder << cookiePersistentStoragePath;
@@ -148,6 +173,11 @@
decoder >> httpsProxy;
if (!httpsProxy)
return WTF::nullopt;
+
+ Optional<bool> enableLegacyTLS;
+ decoder >> enableLegacyTLS;
+ if (!enableLegacyTLS)
+ return WTF::nullopt;
#endif
#if USE(SOUP)
@@ -247,6 +277,7 @@
, WTFMove(*loadThrottleLatency)
, WTFMove(*httpProxy)
, WTFMove(*httpsProxy)
+ , WTFMove(*enableLegacyTLS)
#endif
#if USE(SOUP)
, WTFMove(*cookiePersistentStoragePath)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h (249018 => 249019)
--- trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h 2019-08-22 18:13:08 UTC (rev 249019)
@@ -72,6 +72,7 @@
Seconds loadThrottleLatency;
URL httpProxy;
URL httpsProxy;
+ bool enableLegacyTLS { false };
#endif
#if USE(SOUP)
String cookiePersistentStoragePath;
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (249018 => 249019)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm 2019-08-22 18:13:08 UTC (rev 249019)
@@ -940,6 +940,14 @@
NSURLSessionConfiguration *configuration = configurationForSessionID(m_sessionID);
+ if (!parameters.enableLegacyTLS) {
+#if HAVE(TLS_PROTOCOL_VERSION_T)
+ configuration.TLSMinimumSupportedProtocolVersion = tls_protocol_version_TLSv12;
+#else
+ configuration.TLSMinimumSupportedProtocol = kTLSProtocol12;
+#endif
+ }
+
#if HAVE(APP_SSO)
configuration._preventsAppSSO = true;
#endif
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (249018 => 249019)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2019-08-22 18:13:08 UTC (rev 249019)
@@ -281,6 +281,8 @@
}
}
+ parameters.defaultDataStoreParameters.networkSessionParameters.enableLegacyTLS = [defaults boolForKey:@"WebKitEnableLegacyTLS"];
+
parameters.networkATSContext = adoptCF(_CFNetworkCopyATSContext());
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (249018 => 249019)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2019-08-22 18:01:09 UTC (rev 249018)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2019-08-22 18:13:08 UTC (rev 249019)
@@ -69,6 +69,7 @@
bool enableResourceLoadStatisticsDebugMode = false;
bool enableResourceLoadStatisticsNSURLSessionSwitching = WebCore::RuntimeEnabledFeatures::sharedFeatures().isITPSessionSwitchingEnabled();
WebCore::RegistrableDomain resourceLoadStatisticsManualPrevalentResource { };
+ bool enableLegacyTLS = [defaults boolForKey:@"WebKitEnableLegacyTLS"];
#if ENABLE(RESOURCE_LOAD_STATISTICS)
enableResourceLoadStatisticsDebugMode = [defaults boolForKey:@"ITPDebugMode"];
auto* manualPrevalentResource = [defaults stringForKey:@"ITPManualPrevalentResource"];
@@ -128,6 +129,7 @@
Seconds { [defaults integerForKey:WebKitNetworkLoadThrottleLatencyMillisecondsDefaultsKey] / 1000. },
WTFMove(httpProxy),
WTFMove(httpsProxy),
+ enableLegacyTLS,
WTFMove(resourceLoadStatisticsDirectory),
WTFMove(resourceLoadStatisticsDirectoryHandle),
false,
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
