Title: [193937] trunk/Source
Revision
193937
Author
joep...@webkit.org
Date
2015-12-10 17:37:05 -0800 (Thu, 10 Dec 2015)

Log Message

Remote Inspector: Verify the identity of the other side of XPC connections
https://bugs.webkit.org/show_bug.cgi?id=152153

Reviewed by Brian Burg.

Source/_javascript_Core:

* _javascript_Core.xcodeproj/project.pbxproj:
Link with the Security framework.

* inspector/remote/RemoteInspectorXPCConnection.h:
* inspector/remote/RemoteInspectorXPCConnection.mm:
(auditTokenHasEntitlement):
(Inspector::RemoteInspectorXPCConnection::handleEvent):
(Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection): Deleted.
When receiving the first message, verify the XPC connection
is connected to who we thought we were connected to and
Bail if it isn't.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* platform/network/mac/CertificateInfoMac.mm:
Use the new header.

Source/WebKit2:

* Shared/mac/SandboxUtilities.mm:
* UIProcess/ApplicationStateTracker.mm:
Use new header.

Source/WTF:

* WTF.xcodeproj/project.pbxproj:
* wtf/spi/cocoa/SecuritySPI.h: Renamed from Source/WebCore/platform/spi/cocoa/SecuritySPI.h.
Push this down into WTF from WebCore and add a new method.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (193936 => 193937)


--- trunk/Source/_javascript_Core/ChangeLog	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1,3 +1,22 @@
+2015-12-10  Joseph Pecoraro  <pecor...@apple.com>
+
+        Remote Inspector: Verify the identity of the other side of XPC connections
+        https://bugs.webkit.org/show_bug.cgi?id=152153
+
+        Reviewed by Brian Burg.
+
+        * _javascript_Core.xcodeproj/project.pbxproj:
+        Link with the Security framework.
+
+        * inspector/remote/RemoteInspectorXPCConnection.h:
+        * inspector/remote/RemoteInspectorXPCConnection.mm:
+        (auditTokenHasEntitlement):
+        (Inspector::RemoteInspectorXPCConnection::handleEvent):
+        (Inspector::RemoteInspectorXPCConnection::RemoteInspectorXPCConnection): Deleted.
+        When receiving the first message, verify the XPC connection
+        is connected to who we thought we were connected to and
+        Bail if it isn't.
+
 2015-12-10  Benjamin Poulain  <bpoul...@apple.com>
 
         [JSC] Add a Modulo operator to B3, and a chill variant

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (193936 => 193937)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1501,6 +1501,7 @@
 		A503FA26188EFFFD00110F14 /* ScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA24188EFFFD00110F14 /* ScriptDebugServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A503FA29188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A503FA27188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp */; };
 		A503FA2A188F105900110F14 /* JSGlobalObjectScriptDebugServer.h in Headers */ = {isa = PBXBuildFile; fileRef = A503FA28188F105900110F14 /* JSGlobalObjectScriptDebugServer.h */; };
+		A5098B041C16AA0200087797 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A5098B031C16AA0200087797 /* Security.framework */; };
 		A50E4B6118809DD50068A46D /* InspectorRuntimeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A50E4B5D18809DD50068A46D /* InspectorRuntimeAgent.cpp */; };
 		A50E4B6218809DD50068A46D /* InspectorRuntimeAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		A50E4B6318809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */; };
@@ -3656,6 +3657,7 @@
 		A503FA24188EFFFD00110F14 /* ScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptDebugServer.h; sourceTree = "<group>"; };
 		A503FA27188F105900110F14 /* JSGlobalObjectScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectScriptDebugServer.cpp; sourceTree = "<group>"; };
 		A503FA28188F105900110F14 /* JSGlobalObjectScriptDebugServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObjectScriptDebugServer.h; sourceTree = "<group>"; };
+		A5098B031C16AA0200087797 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; };
 		A50E4B5D18809DD50068A46D /* InspectorRuntimeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorRuntimeAgent.cpp; sourceTree = "<group>"; };
 		A50E4B5E18809DD50068A46D /* InspectorRuntimeAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorRuntimeAgent.h; sourceTree = "<group>"; };
 		A50E4B5F18809DD50068A46D /* JSGlobalObjectRuntimeAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGlobalObjectRuntimeAgent.cpp; sourceTree = "<group>"; };
@@ -4298,6 +4300,7 @@
 			files = (
 				932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */,
 				A731B25A130093880040A7FA /* Foundation.framework in Frameworks */,
+				A5098B041C16AA0200087797 /* Security.framework in Frameworks */,
 				932F5BD70822A1C700736975 /* libicucore.dylib in Frameworks */,
 				932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */,
 				A8A4748E151A8306004123FF /* libWTF.a in Frameworks */,
@@ -4386,6 +4389,7 @@
 			children = (
 				6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */,
 				51F0EB6105C86C6B00E6DF1B /* Foundation.framework */,
+				A5098B031C16AA0200087797 /* Security.framework */,
 				5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */,
 				9322A00306C341D3009067BB /* libicucore.dylib */,
 				51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */,

Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorXPCConnection.h (193936 => 193937)


--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorXPCConnection.h	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorXPCConnection.h	2015-12-11 01:37:05 UTC (rev 193937)
@@ -67,7 +67,10 @@
     xpc_connection_t m_connection;
     dispatch_queue_t m_queue;
     Client* m_client;
-    bool m_closed;
+    bool m_closed { false };
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)
+    bool m_validated { false };
+#endif
 };
 
 } // namespace Inspector

Modified: trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorXPCConnection.mm (193936 => 193937)


--- trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorXPCConnection.mm	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/_javascript_Core/inspector/remote/RemoteInspectorXPCConnection.mm	2015-12-11 01:37:05 UTC (rev 193937)
@@ -34,6 +34,7 @@
 #import <wtf/Lock.h>
 #import <wtf/Ref.h>
 #import <wtf/RetainPtr.h>
+#import <wtf/spi/cocoa/SecuritySPI.h>
 #import <wtf/spi/darwin/XPCSPI.h>
 
 #if __has_include(<CoreFoundation/CFXPCBridge.h>)
@@ -45,6 +46,24 @@
 }
 #endif
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)
+static bool auditTokenHasEntitlement(audit_token_t token, NSString *entitlement)
+{
+    auto task = adoptCF(SecTaskCreateWithAuditToken(kCFAllocatorDefault, token));
+    if (!task)
+        return false;
+
+    auto value = adoptCF(SecTaskCopyValueForEntitlement(task.get(), (CFStringRef)entitlement, nullptr));
+    if (!value)
+        return false;
+
+    if (CFGetTypeID(value.get()) != CFBooleanGetTypeID())
+        return false;
+
+    return CFBooleanGetValue(static_cast<CFBooleanRef>(value.get()));
+}
+#endif
+
 namespace Inspector {
 
 // Constants private to this file for message serialization on both ends.
@@ -56,7 +75,6 @@
     : m_connection(connection)
     , m_queue(queue)
     , m_client(client)
-    , m_closed(false)
 {
     dispatch_retain(m_queue);
 
@@ -150,6 +168,27 @@
         return;
     }
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)
+    if (!m_validated) {
+        audit_token_t token;
+        xpc_connection_get_audit_token(m_connection, &token);
+        if (!auditTokenHasEntitlement(token, @"com.apple.private.webinspector.webinspectord")) {
+            {
+                std::lock_guard<Lock> lock(m_mutex);
+                if (m_client)
+                    m_client->xpcConnectionFailed(this);
+
+                m_closed = true;
+                m_client = nullptr;
+                closeOnQueue();
+            }
+            deref();
+            return;
+        }
+        m_validated = true;
+    }
+#endif
+
     NSDictionary *dataDictionary = deserializeMessage(object);
     if (!dataDictionary)
         return;

Modified: trunk/Source/WTF/ChangeLog (193936 => 193937)


--- trunk/Source/WTF/ChangeLog	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WTF/ChangeLog	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1,3 +1,14 @@
+2015-12-10  Joseph Pecoraro  <pecor...@apple.com>
+
+        Remote Inspector: Verify the identity of the other side of XPC connections
+        https://bugs.webkit.org/show_bug.cgi?id=152153
+
+        Reviewed by Brian Burg.
+
+        * WTF.xcodeproj/project.pbxproj:
+        * wtf/spi/cocoa/SecuritySPI.h: Renamed from Source/WebCore/platform/spi/cocoa/SecuritySPI.h.
+        Push this down into WTF from WebCore and add a new method.
+
 2015-12-08  Filip Pizlo  <fpi...@apple.com>
 
         FTL B3 should have basic GetById support

Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (193936 => 193937)


--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2015-12-11 01:37:05 UTC (rev 193937)
@@ -116,6 +116,7 @@
 		9BC70F05176C379D00101DEC /* AtomicStringTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */; };
 		9BD8F40B176C2B470002D865 /* AtomicStringTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */; };
 		A5098B001C169E0700087797 /* SandboxSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A5098AFF1C169E0700087797 /* SandboxSPI.h */; };
+		A5098B021C16A4F900087797 /* SecuritySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A5098B011C16A4F900087797 /* SecuritySPI.h */; };
 		A5BA15F3182433A900A82E69 /* StringMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15F2182433A900A82E69 /* StringMac.mm */; };
 		A5BA15F51824348000A82E69 /* StringImplMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15F41824348000A82E69 /* StringImplMac.mm */; };
 		A5BA15FA182435A600A82E69 /* AtomicStringImplCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A5BA15F7182435A600A82E69 /* AtomicStringImplCF.cpp */; };
@@ -424,6 +425,7 @@
 		9BC70F04176C379D00101DEC /* AtomicStringTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomicStringTable.cpp; sourceTree = "<group>"; };
 		9BD8F40A176C2AD80002D865 /* AtomicStringTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtomicStringTable.h; sourceTree = "<group>"; };
 		A5098AFF1C169E0700087797 /* SandboxSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxSPI.h; sourceTree = "<group>"; };
+		A5098B011C16A4F900087797 /* SecuritySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecuritySPI.h; sourceTree = "<group>"; };
 		A5BA15F2182433A900A82E69 /* StringMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = StringMac.mm; path = mac/StringMac.mm; sourceTree = "<group>"; };
 		A5BA15F41824348000A82E69 /* StringImplMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = StringImplMac.mm; path = mac/StringImplMac.mm; sourceTree = "<group>"; };
 		A5BA15F7182435A600A82E69 /* AtomicStringImplCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtomicStringImplCF.cpp; path = cf/AtomicStringImplCF.cpp; sourceTree = "<group>"; };
@@ -1054,6 +1056,7 @@
 			isa = PBXGroup;
 			children = (
 				CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */,
+				A5098B011C16A4F900087797 /* SecuritySPI.h */,
 			);
 			path = cocoa;
 			sourceTree = "<group>";
@@ -1119,6 +1122,7 @@
 				A8A47452151A825B004123FF /* BinarySemaphore.h in Headers */,
 				A8A4738A151A825B004123FF /* Bitmap.h in Headers */,
 				A8A4738C151A825B004123FF /* BitVector.h in Headers */,
+				A5098B021C16A4F900087797 /* SecuritySPI.h in Headers */,
 				A8A4738E151A825B004123FF /* BlockStack.h in Headers */,
 				A8A4738F151A825B004123FF /* BloomFilter.h in Headers */,
 				A8A47391151A825B004123FF /* BumpPointerAllocator.h in Headers */,

Copied: trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h (from rev 193936, trunk/Source/WebCore/platform/spi/cocoa/SecuritySPI.h) (0 => 193937)


--- trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h	                        (rev 0)
+++ trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h	2015-12-11 01:37:05 UTC (rev 193937)
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef SecuritySPI_h
+#define SecuritySPI_h
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#include <Security/SecCertificatePriv.h>
+#include <Security/SecTask.h>
+
+#else
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) || PLATFORM(IOS)
+typedef uint32_t SecSignatureHashAlgorithm;
+enum {
+    kSecSignatureHashAlgorithmUnknown = 0,
+    kSecSignatureHashAlgorithmMD2 = 1,
+    kSecSignatureHashAlgorithmMD4 = 2,
+    kSecSignatureHashAlgorithmMD5 = 3,
+    kSecSignatureHashAlgorithmSHA1 = 4,
+    kSecSignatureHashAlgorithmSHA224 = 5,
+    kSecSignatureHashAlgorithmSHA256 = 6,
+    kSecSignatureHashAlgorithmSHA384 = 7,
+    kSecSignatureHashAlgorithmSHA512 = 8
+};
+
+EXTERN_C SecSignatureHashAlgorithm SecCertificateGetSignatureHashAlgorithm(SecCertificateRef);
+#endif
+
+#endif
+
+typedef struct __SecTask *SecTaskRef;
+EXTERN_C SecTaskRef SecTaskCreateWithAuditToken(CFAllocatorRef, audit_token_t);
+EXTERN_C SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef);
+EXTERN_C CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef, CFStringRef entitlement, CFErrorRef *);
+
+#endif // SecuritySPI_h

Modified: trunk/Source/WebCore/ChangeLog (193936 => 193937)


--- trunk/Source/WebCore/ChangeLog	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebCore/ChangeLog	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1,3 +1,14 @@
+2015-12-10  Joseph Pecoraro  <pecor...@apple.com>
+
+        Remote Inspector: Verify the identity of the other side of XPC connections
+        https://bugs.webkit.org/show_bug.cgi?id=152153
+
+        Reviewed by Brian Burg.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/network/mac/CertificateInfoMac.mm:
+        Use the new header.
+
 2015-12-10  Brady Eidson  <beid...@apple.com>
 
         Modern IDB: storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html fails

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (193936 => 193937)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1377,7 +1377,6 @@
 		339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		33D0212D131DB37B004091A8 /* CookieStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = E13F01EA1270E10D00DFBA71 /* CookieStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		3571883EEF618793751E4089 /* RenderMathMLMenclose.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */; };
-		3717833A1AACDCF7000910E3 /* SecuritySPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 371783391AACDCF7000910E3 /* SecuritySPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		3717D7E817ECC591003C276D /* extract-localizable-strings.pl in Copy Scripts */ = {isa = PBXBuildFile; fileRef = 3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */; };
 		371A67CB11C6C7DB00047B8B /* HyphenationCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 371A67CA11C6C7DB00047B8B /* HyphenationCF.cpp */; };
 		371E65CC13661EDC00BEEDB0 /* PageSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 371E65CB13661EDC00BEEDB0 /* PageSerializer.h */; };
@@ -8745,7 +8744,6 @@
 		3390CA530FFC157B00921962 /* NotificationCenter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NotificationCenter.idl; sourceTree = "<group>"; };
 		339B5B62131DAA3200F48D02 /* CookiesStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CookiesStrategy.h; sourceTree = "<group>"; };
 		3662F984047CEDBE5DDDAFAA /* RenderMathMLMenclose.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMathMLMenclose.cpp; sourceTree = "<group>"; };
-		371783391AACDCF7000910E3 /* SecuritySPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecuritySPI.h; sourceTree = "<group>"; };
 		3717D7E517ECC3A6003C276D /* extract-localizable-strings.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = "extract-localizable-strings.pl"; sourceTree = "<group>"; };
 		371A67CA11C6C7DB00047B8B /* HyphenationCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HyphenationCF.cpp; sourceTree = "<group>"; };
 		371E65CB13661EDC00BEEDB0 /* PageSerializer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageSerializer.h; sourceTree = "<group>"; };
@@ -17259,7 +17257,6 @@
 				31B313DC1B6987DB00F2AABC /* NSURLRequestSPI.h */,
 				CEE27ACA1BBB53A20072400A /* pthreadSPI.h */,
 				CE12523C1A1676CD00864480 /* QuartzCoreSPI.h */,
-				371783391AACDCF7000910E3 /* SecuritySPI.h */,
 				CEC337AC1A46071F009B8523 /* ServersSPI.h */,
 				A19D93451A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h */,
 			);
@@ -27331,7 +27328,6 @@
 				1AF7AFC81A48A8BC00C8E4E7 /* SecurityOriginPolicy.h in Headers */,
 				974D2DA5146A535D00D51F8B /* SecurityPolicy.h in Headers */,
 				2D5BC42716F882EE007048D0 /* SecurityPolicyViolationEvent.h in Headers */,
-				3717833A1AACDCF7000910E3 /* SecuritySPI.h in Headers */,
 				99CC0B5E18BE984A006CEBCC /* SegmentedInputStorage.h in Headers */,
 				B2C3DA2F0D006C1D00EF6F26 /* SegmentedString.h in Headers */,
 				BEA807C90F714A0300524199 /* SelectionRect.h in Headers */,

Modified: trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm (193936 => 193937)


--- trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebCore/platform/network/mac/CertificateInfoMac.mm	2015-12-11 01:37:05 UTC (rev 193937)
@@ -27,7 +27,7 @@
 #import "CertificateInfo.h"
 
 #import "NotImplemented.h"
-#import "SecuritySPI.h"
+#import <wtf/spi/cocoa/SecuritySPI.h>
 
 namespace WebCore {
 

Deleted: trunk/Source/WebCore/platform/spi/cocoa/SecuritySPI.h (193936 => 193937)


--- trunk/Source/WebCore/platform/spi/cocoa/SecuritySPI.h	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebCore/platform/spi/cocoa/SecuritySPI.h	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2015 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.
- */
-
-#ifndef SecuritySPI_h
-#define SecuritySPI_h
-
-#if USE(APPLE_INTERNAL_SDK)
-#include <Security/SecCertificatePriv.h>
-
-#if PLATFORM(IOS)
-#include <Security/SecTask.h>
-#endif
-
-#else
-
-#if PLATFORM(IOS)
-typedef struct __SecTask *SecTaskRef;
-EXTERN_C SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef);
-EXTERN_C CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef, CFStringRef entitlement, CFErrorRef *);
-#endif
-
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) || PLATFORM(IOS)
-typedef uint32_t SecSignatureHashAlgorithm;
-enum {
-    kSecSignatureHashAlgorithmUnknown = 0,
-    kSecSignatureHashAlgorithmMD2 = 1,
-    kSecSignatureHashAlgorithmMD4 = 2,
-    kSecSignatureHashAlgorithmMD5 = 3,
-    kSecSignatureHashAlgorithmSHA1 = 4,
-    kSecSignatureHashAlgorithmSHA224 = 5,
-    kSecSignatureHashAlgorithmSHA256 = 6,
-    kSecSignatureHashAlgorithmSHA384 = 7,
-    kSecSignatureHashAlgorithmSHA512 = 8
-};
-
-EXTERN_C SecSignatureHashAlgorithm SecCertificateGetSignatureHashAlgorithm(SecCertificateRef);
-
-#endif
-
-#endif
-
-#endif // SecuritySPI_h

Modified: trunk/Source/WebKit2/ChangeLog (193936 => 193937)


--- trunk/Source/WebKit2/ChangeLog	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebKit2/ChangeLog	2015-12-11 01:37:05 UTC (rev 193937)
@@ -1,3 +1,14 @@
+2015-12-10  Joseph Pecoraro  <pecor...@apple.com>
+
+        Remote Inspector: Verify the identity of the other side of XPC connections
+        https://bugs.webkit.org/show_bug.cgi?id=152153
+
+        Reviewed by Brian Burg.
+
+        * Shared/mac/SandboxUtilities.mm:
+        * UIProcess/ApplicationStateTracker.mm:
+        Use new header.
+
 2015-12-10  Alex Christensen  <achristen...@webkit.org>
 
         REGRESSION (r192796) WKBundlePageResourceLoadClient should be able to setHTTPBody in willSendRequestForFrame

Modified: trunk/Source/WebKit2/Shared/mac/SandboxUtilities.mm (193936 => 193937)


--- trunk/Source/WebKit2/Shared/mac/SandboxUtilities.mm	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebKit2/Shared/mac/SandboxUtilities.mm	2015-12-11 01:37:05 UTC (rev 193937)
@@ -26,9 +26,9 @@
 #import "config.h"
 #import "SandboxUtilities.h"
 
-#import <WebCore/SecuritySPI.h>
 #import <array>
 #import <sys/param.h>
+#import <wtf/spi/cocoa/SecuritySPI.h>
 #import <wtf/spi/darwin/SandboxSPI.h>
 #import <wtf/text/WTFString.h>
 

Modified: trunk/Source/WebKit2/UIProcess/ApplicationStateTracker.mm (193936 => 193937)


--- trunk/Source/WebKit2/UIProcess/ApplicationStateTracker.mm	2015-12-11 01:35:17 UTC (rev 193936)
+++ trunk/Source/WebKit2/UIProcess/ApplicationStateTracker.mm	2015-12-11 01:37:05 UTC (rev 193937)
@@ -31,9 +31,9 @@
 #import "AssertionServicesSPI.h"
 #import "SandboxUtilities.h"
 #import "UIKitSPI.h"
-#import <WebCore/SecuritySPI.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/ObjcRuntimeExtras.h>
+#import <wtf/spi/cocoa/SecuritySPI.h>
 
 @interface UIWindow (WKDetails)
 - (BOOL)_isHostedInAnotherProcess;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to