Title: [253834] trunk/Source
Revision
253834
Author
[email protected]
Date
2019-12-20 12:27:17 -0800 (Fri, 20 Dec 2019)

Log Message

Allow a managed configuration to re-enable TLS 1.0 and 1.1
https://bugs.webkit.org/show_bug.cgi?id=205479
<rdar://problem/54493516>

Patch by Alex Christensen <[email protected]> on 2019-12-20
Reviewed by Geoffrey Garen.

Source/WebCore/PAL:

Manually verified using the managed configuration attached to rdar://problem/56727605

* PAL.xcodeproj/project.pbxproj:
* pal/ios/ManagedConfigurationSoftLink.h: Added.
* pal/ios/ManagedConfigurationSoftLink.mm: Added.
* pal/spi/ios/ManagedConfigurationSPI.h: Copied from Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h.

Source/WebKit:

* Platform/spi/ios/ManagedConfigurationSPI.h: Removed.
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformActionForWebView:withSender:]):
(-[WKContentView _defineForWebView:]):
* WebKit.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/PAL/ChangeLog (253833 => 253834)


--- trunk/Source/WebCore/PAL/ChangeLog	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebCore/PAL/ChangeLog	2019-12-20 20:27:17 UTC (rev 253834)
@@ -1,3 +1,18 @@
+2019-12-20  Alex Christensen  <[email protected]>
+
+        Allow a managed configuration to re-enable TLS 1.0 and 1.1
+        https://bugs.webkit.org/show_bug.cgi?id=205479
+        <rdar://problem/54493516>
+
+        Reviewed by Geoffrey Garen.
+
+        Manually verified using the managed configuration attached to rdar://problem/56727605
+
+        * PAL.xcodeproj/project.pbxproj:
+        * pal/ios/ManagedConfigurationSoftLink.h: Added.
+        * pal/ios/ManagedConfigurationSoftLink.mm: Added.
+        * pal/spi/ios/ManagedConfigurationSPI.h: Copied from Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h.
+
 2019-12-19  Wenson Hsieh  <[email protected]>
 
         pal/FileSizeFormatter.h declares fileSizeDescription in the top-level namespace

Modified: trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj (253833 => 253834)


--- trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj	2019-12-20 20:27:17 UTC (rev 253834)
@@ -126,6 +126,9 @@
 		576CA9D622B854AB0030143C /* AppSSOSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 576CA9D522B854AB0030143C /* AppSSOSPI.h */; };
 		57FD318A22B3593E008D0E8B /* AppSSOSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 57FD318922B3593E008D0E8B /* AppSSOSoftLink.mm */; };
 		57FD318B22B35989008D0E8B /* AppSSOSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 57FD318822B3592F008D0E8B /* AppSSOSoftLink.h */; };
+		5C7C787323AC3E770065F47E /* ManagedConfigurationSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7C787123AC3E770065F47E /* ManagedConfigurationSoftLink.h */; };
+		5C7C787423AC3E770065F47E /* ManagedConfigurationSoftLink.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7C787223AC3E770065F47E /* ManagedConfigurationSoftLink.mm */; };
+		5C7C787623AC3E850065F47E /* ManagedConfigurationSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C7C787523AC3E850065F47E /* ManagedConfigurationSPI.h */; };
 		63C7EDC721AFAE04006A7B99 /* NSProgressSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 63E369F921AFA83F001C14BC /* NSProgressSPI.h */; };
 		7A1656441F97B2B900BA3CE4 /* NSKeyedArchiverSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */; };
 		7A36D0F9223AD9AB00B0522E /* CommonCryptoSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A36D0F8223AD9AB00B0522E /* CommonCryptoSPI.h */; };
@@ -299,6 +302,9 @@
 		576CA9D522B854AB0030143C /* AppSSOSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppSSOSPI.h; sourceTree = "<group>"; };
 		57FD318822B3592F008D0E8B /* AppSSOSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppSSOSoftLink.h; sourceTree = "<group>"; };
 		57FD318922B3593E008D0E8B /* AppSSOSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppSSOSoftLink.mm; sourceTree = "<group>"; };
+		5C7C787123AC3E770065F47E /* ManagedConfigurationSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedConfigurationSoftLink.h; sourceTree = "<group>"; };
+		5C7C787223AC3E770065F47E /* ManagedConfigurationSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ManagedConfigurationSoftLink.mm; sourceTree = "<group>"; };
+		5C7C787523AC3E850065F47E /* ManagedConfigurationSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedConfigurationSPI.h; sourceTree = "<group>"; };
 		63E369F921AFA83F001C14BC /* NSProgressSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSProgressSPI.h; sourceTree = "<group>"; };
 		7A1656431F97B2B800BA3CE4 /* NSKeyedArchiverSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSKeyedArchiverSPI.h; sourceTree = "<group>"; };
 		7A36D0F8223AD9AB00B0522E /* CommonCryptoSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonCryptoSPI.h; sourceTree = "<group>"; };
@@ -460,6 +466,7 @@
 				0C5AF90F1F43A4C7002EAC02 /* CoreUISPI.h */,
 				0C5AF9101F43A4C7002EAC02 /* DataDetectorsUISPI.h */,
 				0C5AF9111F43A4C7002EAC02 /* GraphicsServicesSPI.h */,
+				5C7C787523AC3E850065F47E /* ManagedConfigurationSPI.h */,
 				0C5AF9131F43A4C7002EAC02 /* MediaPlayerSPI.h */,
 				0C5AF9141F43A4C7002EAC02 /* MobileGestaltSPI.h */,
 				0C5AF9151F43A4C7002EAC02 /* OpenGLESSPI.h */,
@@ -618,6 +625,8 @@
 		2E87C06E215A993100D6CD32 /* ios */ = {
 			isa = PBXGroup;
 			children = (
+				5C7C787123AC3E770065F47E /* ManagedConfigurationSoftLink.h */,
+				5C7C787223AC3E770065F47E /* ManagedConfigurationSoftLink.mm */,
 				4450FC9E21F5F602004DFA56 /* QuickLookSoftLink.h */,
 				4450FC9D21F5F602004DFA56 /* QuickLookSoftLink.mm */,
 				2E1342CA215AA10A007199D2 /* UIKitSoftLink.h */,
@@ -752,6 +761,8 @@
 				1C4876D91F8D7F4E00CCEEBD /* Logging.h in Headers */,
 				44E1A8AF21FA54E600C3048E /* LookupSoftLink.h in Headers */,
 				0C77858B1F45130F00F4EBB6 /* LookupSPI.h in Headers */,
+				5C7C787323AC3E770065F47E /* ManagedConfigurationSoftLink.h in Headers */,
+				5C7C787623AC3E850065F47E /* ManagedConfigurationSPI.h in Headers */,
 				0C5AF91D1F43A4C7002EAC02 /* MediaPlayerSPI.h in Headers */,
 				0C77858C1F45130F00F4EBB6 /* MediaRemoteSPI.h in Headers */,
 				0C00CFD41F68CE4600AAC26D /* MediaTimeAVFoundation.h in Headers */,
@@ -931,6 +942,7 @@
 				A30D41251F0DD12D00B71954 /* KillRingMac.mm in Sources */,
 				1C4876D81F8D7F4E00CCEEBD /* Logging.cpp in Sources */,
 				44E1A8B021FA54EB00C3048E /* LookupSoftLink.mm in Sources */,
+				5C7C787423AC3E770065F47E /* ManagedConfigurationSoftLink.mm in Sources */,
 				0CF99CA41F736375007EE793 /* MediaTimeAVFoundation.cpp in Sources */,
 				CDACB3602387425B0018D7CE /* MediaToolboxSoftLink.cpp in Sources */,
 				A1F63CA021A4DBF7006FB43B /* PassKitSoftLink.mm in Sources */,

Copied: trunk/Source/WebCore/PAL/pal/ios/ManagedConfigurationSoftLink.h (from rev 253833, trunk/Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h) (0 => 253834)


--- trunk/Source/WebCore/PAL/pal/ios/ManagedConfigurationSoftLink.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/ios/ManagedConfigurationSoftLink.h	2019-12-20 20:27:17 UTC (rev 253834)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+
+#import <pal/spi/ios/ManagedConfigurationSPI.h>
+#import <wtf/SoftLinking.h>
+
+SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, ManagedConfiguration)
+
+SOFT_LINK_CLASS_FOR_HEADER(PAL, MCProfileConnection);
+SOFT_LINK_CONSTANT_FOR_HEADER(PAL, ManagedConfiguration, MCFeatureDefinitionLookupAllowed, NSString *)
+
+#endif

Copied: trunk/Source/WebCore/PAL/pal/ios/ManagedConfigurationSoftLink.mm (from rev 253833, trunk/Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h) (0 => 253834)


--- trunk/Source/WebCore/PAL/pal/ios/ManagedConfigurationSoftLink.mm	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/ios/ManagedConfigurationSoftLink.mm	2019-12-20 20:27:17 UTC (rev 253834)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+
+#import <pal/spi/ios/UIKitSPI.h>
+#import <wtf/SoftLinking.h>
+
+SOFT_LINK_PRIVATE_FRAMEWORK_FOR_SOURCE(PAL, ManagedConfiguration)
+
+SOFT_LINK_CLASS_FOR_SOURCE_WITH_EXPORT(PAL, ManagedConfiguration, MCProfileConnection, PAL_EXPORT);
+SOFT_LINK_CONSTANT_FOR_SOURCE_WITH_EXPORT(PAL, ManagedConfiguration, MCFeatureDefinitionLookupAllowed, NSString *, PAL_EXPORT)
+
+#endif

Copied: trunk/Source/WebCore/PAL/pal/spi/ios/ManagedConfigurationSPI.h (from rev 253833, trunk/Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h) (0 => 253834)


--- trunk/Source/WebCore/PAL/pal/spi/ios/ManagedConfigurationSPI.h	                        (rev 0)
+++ trunk/Source/WebCore/PAL/pal/spi/ios/ManagedConfigurationSPI.h	2019-12-20 20:27:17 UTC (rev 253834)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+
+#if USE(APPLE_INTERNAL_SDK)
+
+// FIXME: We conditionally enclose the ManagedConfiguration headers in an extern "C" linkage
+// block to make them suitable for C++ use.
+WTF_EXTERN_C_BEGIN
+
+#import <ManagedConfiguration/MCFeatures.h>
+#import <ManagedConfiguration/MCProfileConnection.h>
+
+WTF_EXTERN_C_END
+
+#else
+
+WTF_EXTERN_C_BEGIN
+
+extern NSString * const MCFeatureDefinitionLookupAllowed;
+
+WTF_EXTERN_C_END
+
+typedef enum MCRestrictedBoolType {
+    MCRestrictedBoolExplicitYes = 1,
+    MCRestrictedBoolExplicitNo = 2,
+} MCRestrictedBoolType;
+
+@interface MCProfileConnection : NSObject
+@end
+
+@interface MCProfileConnection ()
++ (MCProfileConnection *)sharedConnection;
+- (MCRestrictedBoolType)effectiveBoolValueForSetting:(NSString *)feature;
+@end
+
+#endif
+
+#endif // PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)

Modified: trunk/Source/WebKit/ChangeLog (253833 => 253834)


--- trunk/Source/WebKit/ChangeLog	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKit/ChangeLog	2019-12-20 20:27:17 UTC (rev 253834)
@@ -1,3 +1,21 @@
+2019-12-20  Alex Christensen  <[email protected]>
+
+        Allow a managed configuration to re-enable TLS 1.0 and 1.1
+        https://bugs.webkit.org/show_bug.cgi?id=205479
+        <rdar://problem/54493516>
+
+        Reviewed by Geoffrey Garen.
+
+        * Platform/spi/ios/ManagedConfigurationSPI.h: Removed.
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
+        * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
+        (WebKit::WebsiteDataStore::parameters):
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView canPerformActionForWebView:withSender:]):
+        (-[WKContentView _defineForWebView:]):
+        * WebKit.xcodeproj/project.pbxproj:
+
 2019-12-20  youenn fablet  <[email protected]>
 
         Set whether to use mock capture devices at GPUProcess creation time.

Deleted: trunk/Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h (253833 => 253834)


--- trunk/Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKit/Platform/spi/ios/ManagedConfigurationSPI.h	2019-12-20 20:27:17 UTC (rev 253834)
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2014-2019 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
-
-#if USE(APPLE_INTERNAL_SDK)
-
-// FIXME: We conditionally enclose the ManagedConfiguration headers in an extern "C" linkage
-// block to make them suitable for C++ use.
-WTF_EXTERN_C_BEGIN
-
-#import <ManagedConfiguration/MCFeatures.h>
-#import <ManagedConfiguration/MCProfileConnection.h>
-
-WTF_EXTERN_C_END
-
-#else
-
-WTF_EXTERN_C_BEGIN
-
-extern NSString * const MCFeatureDefinitionLookupAllowed;
-
-WTF_EXTERN_C_END
-
-typedef enum MCRestrictedBoolType {
-    MCRestrictedBoolExplicitNo = 1 << 1,
-} MCRestrictedBoolType;
-
-@interface MCProfileConnection : NSObject
-@end
-
-@interface MCProfileConnection ()
-+ (MCProfileConnection *)sharedConnection;
-- (MCRestrictedBoolType)effectiveBoolValueForSetting:(NSString *)feature;
-@end
-
-#endif
-
-#endif // PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (253833 => 253834)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2019-12-20 20:27:17 UTC (rev 253834)
@@ -67,6 +67,8 @@
 #else
 #import "AccessibilitySupportSPI.h"
 #import "UIKitSPI.h"
+#import <pal/ios/ManagedConfigurationSoftLink.h>
+#import <pal/spi/ios/ManagedConfigurationSPI.h>
 #endif
 
 #if PLATFORM(IOS)
@@ -367,6 +369,13 @@
     parameters.enableLegacyTLS = false;
     if (id value = [defaults objectForKey:@"WebKitEnableLegacyTLS"])
         parameters.enableLegacyTLS = [value boolValue];
+    if (!parameters.enableLegacyTLS) {
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+        parameters.enableLegacyTLS = [[PAL::getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:@"allowDeprecatedWebKitTLS"] == MCRestrictedBoolExplicitYes;
+#elif PLATFORM(MAC)
+        parameters.enableLegacyTLS = CFPreferencesGetAppBooleanValue(CFSTR("allowDeprecatedWebKitTLS"), CFSTR("com.apple.applicationaccess"), nullptr);
+#endif
+    }
     parameters.defaultDataStoreParameters.networkSessionParameters.enableLegacyTLS = parameters.enableLegacyTLS;
 
     parameters.networkATSContext = adoptCF(_CFNetworkCopyATSContext());

Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (253833 => 253834)


--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm	2019-12-20 20:27:17 UTC (rev 253834)
@@ -46,6 +46,8 @@
 
 #if PLATFORM(IOS_FAMILY)
 #import <UIKit/UIApplication.h>
+#import <pal/ios/ManagedConfigurationSoftLink.h>
+#import <pal/spi/ios/ManagedConfigurationSPI.h>
 #endif
 
 namespace WebKit {
@@ -75,6 +77,13 @@
     bool enableLegacyTLS = false;
     if (id value = [defaults objectForKey:@"WebKitEnableLegacyTLS"])
         enableLegacyTLS = [value boolValue];
+    if (!enableLegacyTLS) {
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+        enableLegacyTLS = [[PAL::getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:@"allowDeprecatedWebKitTLS"] == MCRestrictedBoolExplicitYes;
+#elif PLATFORM(MAC)
+        enableLegacyTLS = CFPreferencesGetAppBooleanValue(CFSTR("allowDeprecatedWebKitTLS"), CFSTR("com.apple.applicationaccess"), nullptr);
+#endif
+    }
     WebCore::RegistrableDomain resourceLoadStatisticsManualPrevalentResource { };
 #if ENABLE(RESOURCE_LOAD_STATISTICS)
     enableResourceLoadStatisticsDebugMode = [defaults boolForKey:@"ITPDebugMode"];

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (253833 => 253834)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2019-12-20 20:27:17 UTC (rev 253834)
@@ -112,11 +112,13 @@
 #import <WebCore/WebEvent.h>
 #import <WebCore/WritingDirection.h>
 #import <WebKit/WebSelectionRect.h> // FIXME: WK2 should not include WebKit headers!
+#import <pal/ios/ManagedConfigurationSoftLink.h>
 #import <pal/spi/cg/CoreGraphicsSPI.h>
 #import <pal/spi/cocoa/DataDetectorsCoreSPI.h>
 #import <pal/spi/cocoa/LaunchServicesSPI.h>
 #import <pal/spi/ios/DataDetectorsUISPI.h>
 #import <pal/spi/ios/GraphicsServicesSPI.h>
+#import <pal/spi/ios/ManagedConfigurationSPI.h>
 #import <wtf/BlockObjCExceptions.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/Optional.h>
@@ -158,15 +160,6 @@
 #import <WebCore/TouchAction.h>
 #endif
 
-#if !PLATFORM(MACCATALYST)
-#import "ManagedConfigurationSPI.h"
-#import <wtf/SoftLinking.h>
-
-SOFT_LINK_PRIVATE_FRAMEWORK(ManagedConfiguration);
-SOFT_LINK_CLASS(ManagedConfiguration, MCProfileConnection);
-SOFT_LINK_CONSTANT(ManagedConfiguration, MCFeatureDefinitionLookupAllowed, NSString *)
-#endif
-
 #if HAVE(LINK_PREVIEW) && USE(UICONTEXTMENU)
 static NSString * const webkitShowLinkPreviewsPreferenceKey = @"WebKitShowLinkPreviews";
 #endif
@@ -3348,7 +3341,7 @@
             return NO;
 
 #if !PLATFORM(MACCATALYST)
-        if ([[getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:getMCFeatureDefinitionLookupAllowed()] == MCRestrictedBoolExplicitNo)
+        if ([[PAL::getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:PAL::get_ManagedConfiguration_MCFeatureDefinitionLookupAllowed()] == MCRestrictedBoolExplicitNo)
             return NO;
 #endif
             
@@ -3360,7 +3353,7 @@
             return NO;
 
 #if !PLATFORM(MACCATALYST)
-        if ([[getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:getMCFeatureDefinitionLookupAllowed()] == MCRestrictedBoolExplicitNo)
+        if ([[PAL::getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:PAL::get_ManagedConfiguration_MCFeatureDefinitionLookupAllowed()] == MCRestrictedBoolExplicitNo)
             return NO;
 #endif
 
@@ -3563,7 +3556,8 @@
 - (void)_defineForWebView:(id)sender
 {
 #if !PLATFORM(MACCATALYST)
-    if ([[getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:getMCFeatureDefinitionLookupAllowed()] == MCRestrictedBoolExplicitNo)
+    MCProfileConnection *connection = [PAL::getMCProfileConnectionClass() sharedConnection];
+    if ([connection effectiveBoolValueForSetting:PAL::get_ManagedConfiguration_MCFeatureDefinitionLookupAllowed()] == MCRestrictedBoolExplicitNo)
         return;
 #endif
 

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (253833 => 253834)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-12-20 20:27:17 UTC (rev 253834)
@@ -1686,7 +1686,6 @@
 		CDCA85C9132ABA4E00E961DF /* WKFullScreenWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */; };
 		CE11AD521CBC482F00681EE5 /* CodeSigning.h in Headers */ = {isa = PBXBuildFile; fileRef = CE11AD511CBC482F00681EE5 /* CodeSigning.h */; };
 		CE1A0BD21A48E6C60054EF74 /* AssertionServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BCC1A48E6C60054EF74 /* AssertionServicesSPI.h */; };
-		CE1A0BD51A48E6C60054EF74 /* ManagedConfigurationSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */; };
 		CE1A0BD61A48E6C60054EF74 /* TCCSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */; };
 		CE1A0BD71A48E6C60054EF74 /* TextInputSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */; };
 		CE550E152283752200D28791 /* InsertTextOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = CE550E12228373C800D28791 /* InsertTextOptions.h */; };
@@ -4829,7 +4828,6 @@
 		CE11AD4F1CBC47F800681EE5 /* CodeSigning.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CodeSigning.mm; sourceTree = "<group>"; };
 		CE11AD511CBC482F00681EE5 /* CodeSigning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeSigning.h; sourceTree = "<group>"; };
 		CE1A0BCC1A48E6C60054EF74 /* AssertionServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssertionServicesSPI.h; sourceTree = "<group>"; };
-		CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManagedConfigurationSPI.h; sourceTree = "<group>"; };
 		CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TCCSPI.h; sourceTree = "<group>"; };
 		CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInputSPI.h; sourceTree = "<group>"; };
 		CE550E12228373C800D28791 /* InsertTextOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InsertTextOptions.h; sourceTree = "<group>"; };
@@ -9509,7 +9507,6 @@
 				CE1A0BCC1A48E6C60054EF74 /* AssertionServicesSPI.h */,
 				CDA041F31ACE2105004A13EC /* BackBoardServicesSPI.h */,
 				2D4AF0882044C3C4006C8817 /* FrontBoardServicesSPI.h */,
-				CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */,
 				A13B3DA1207F39DE0090C58D /* MobileWiFiSPI.h */,
 				3178AF9720E2A7F80074DE94 /* PDFKitSPI.h */,
 				2DC18FAF218912640025A88D /* PencilKitSPI.h */,
@@ -9984,7 +9981,6 @@
 				1A6D86C21DF75265007745E8 /* MachMessage.h in Headers */,
 				BCC56F791159957D001CCAF9 /* MachPort.h in Headers */,
 				1A24B5F311F531E800C38269 /* MachUtilities.h in Headers */,
-				CE1A0BD51A48E6C60054EF74 /* ManagedConfigurationSPI.h in Headers */,
 				0792314F239D623E009598E2 /* MediaPlayerPrivateRemoteIdentifier.h in Headers */,
 				51933DEF1965EB31008AC3EA /* MenuUtilities.h in Headers */,
 				1AC4C82916B876A90069DCCD /* MessageFlags.h in Headers */,

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (253833 => 253834)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-12-20 20:27:17 UTC (rev 253834)
@@ -1,3 +1,14 @@
+2019-12-20  Alex Christensen  <[email protected]>
+
+        Allow a managed configuration to re-enable TLS 1.0 and 1.1
+        https://bugs.webkit.org/show_bug.cgi?id=205479
+        <rdar://problem/54493516>
+
+        Reviewed by Geoffrey Garen.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+
 2019-12-17  Kate Cheney  <[email protected]>
 
         Add run-time flag for in-app browser privacy

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (253833 => 253834)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-12-20 19:40:37 UTC (rev 253833)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2019-12-20 20:27:17 UTC (rev 253834)
@@ -305,6 +305,8 @@
 #import <WebCore/WebSQLiteDatabaseTrackerClient.h>
 #import <WebCore/WebVideoFullscreenControllerAVKit.h>
 #import <libkern/OSAtomic.h>
+#import <pal/ios/ManagedConfigurationSoftLink.h>
+#import <pal/spi/ios/ManagedConfigurationSPI.h>
 #import <pal/spi/ios/MobileGestaltSPI.h>
 #import <wtf/FastMalloc.h>
 #endif
@@ -1418,10 +1420,17 @@
             WebCore::DeprecatedGlobalSettings::setShouldManageAudioSessionCategory(true);
 #endif
 
+        bool enableLegacyTLS = false;
         if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKitEnableLegacyTLS"])
-            WebCore::SocketStreamHandleImpl::setLegacyTLSEnabled([value boolValue]);
-        else
-            WebCore::SocketStreamHandleImpl::setLegacyTLSEnabled(false);
+            enableLegacyTLS = [value boolValue];
+        if (!enableLegacyTLS) {
+#if PLATFORM(IOS_FAMILY) && !PLATFORM(MACCATALYST)
+            enableLegacyTLS = [[PAL::getMCProfileConnectionClass() sharedConnection] effectiveBoolValueForSetting:@"allowDeprecatedWebKitTLS"] == MCRestrictedBoolExplicitYes;
+#elif PLATFORM(MAC)
+            enableLegacyTLS = CFPreferencesGetAppBooleanValue(CFSTR("allowDeprecatedWebKitTLS"), CFSTR("com.apple.applicationaccess"), nullptr);
+#endif
+        }
+        WebCore::SocketStreamHandleImpl::setLegacyTLSEnabled(enableLegacyTLS);
 
         didOneTimeInitialization = true;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to