Changeset 169938 in webkit
- Timestamp:
- Jun 13, 2014, 11:04:34 AM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r169937 r169938 1 2014-06-13 Dan Bernstein <mitz@apple.com> 2 3 [iOS] Networking process always decodes keys 4 https://bugs.webkit.org/show_bug.cgi?id=133863 5 6 Reviewed by Anders Carlsson. 7 8 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: 9 (WebKit::XPCServiceInitializer): Call checkEntitlements on iOS, too. 10 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: 11 (WebKit::XPCServiceInitializerDelegate::checkEntitlements): On iOS, allow decoding keys 12 if the application has the appropriate keychain access group. 13 14 * Shared/cf/ArgumentCodersCF.cpp: 15 (IPC::setAllowsDecodingSecKeyRef): Added. Sets static bool. 16 (IPC::decode): Check the secKeyRefDecodingAllowed bool before decoding a key. 17 * Shared/cf/ArgumentCodersCF.h: 18 1 19 2014-06-12 Anders Carlsson <andersca@apple.com> 2 20 -
trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h
r169546 r169938 51 51 virtual ~XPCServiceInitializerDelegate(); 52 52 53 #if PLATFORM(MAC)54 53 virtual bool checkEntitlements(); 55 #endif56 54 57 55 virtual bool getConnectionIdentifier(IPC::Connection::Identifier& identifier); … … 79 77 InitializeWebKit2(); 80 78 81 #if PLATFORM(MAC)82 79 if (!delegate.checkEntitlements()) 83 80 exit(EXIT_FAILURE); 84 #endif85 81 86 82 ChildProcessInitializationParameters parameters; -
trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm
r169457 r169938 26 26 #import "config.h" 27 27 28 #import "ArgumentCodersCF.h" 28 29 #import "SandboxUtilities.h" 29 30 #import "XPCServiceEntryPoint.h" … … 42 43 } 43 44 44 #if PLATFORM(MAC)45 45 bool XPCServiceInitializerDelegate::checkEntitlements() 46 46 { 47 #if PLATFORM(MAC) 47 48 if (!isClientSandboxed()) 48 49 return true; … … 53 54 return false; 54 55 } 56 #endif 57 #if PLATFORM(IOS) 58 auto value = IPC::adoptXPC(xpc_connection_copy_entitlement_value(m_connection.get(), "keychain-access-groups")); 59 if (value && xpc_get_type(value.get()) == XPC_TYPE_ARRAY) { 60 xpc_array_apply(value.get(), ^bool(size_t index, xpc_object_t object) { 61 if (xpc_get_type(object) == XPC_TYPE_STRING && !strcmp(xpc_string_get_string_ptr(object), "com.apple.identities")) { 62 IPC::setAllowsDecodingSecKeyRef(true); 63 return false; 64 } 65 return true; 66 }); 67 } 68 #endif 55 69 56 70 return true; 57 71 } 58 #endif59 72 60 73 bool XPCServiceInitializerDelegate::getConnectionIdentifier(IPC::Connection::Identifier& identifier) -
trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.cpp
r169682 r169938 592 592 } 593 593 594 #if PLATFORM(IOS) 595 static bool secKeyRefDecodingAllowed; 596 597 void setAllowsDecodingSecKeyRef(bool allowsDecodingSecKeyRef) 598 { 599 secKeyRefDecodingAllowed = allowsDecodingSecKeyRef; 600 } 601 #endif 602 594 603 void encode(ArgumentEncoder& encoder, SecIdentityRef identity) 595 604 { … … 637 646 SecKeyRef key = nullptr; 638 647 #if PLATFORM(IOS) 639 SecKeyFindWithPersistentRef(keyData.get(), &key); 648 if (secKeyRefDecodingAllowed) 649 SecKeyFindWithPersistentRef(keyData.get(), &key); 640 650 #endif 641 651 #if PLATFORM(MAC) -
trunk/Source/WebKit2/Shared/cf/ArgumentCodersCF.h
r169682 r169938 89 89 #endif 90 90 91 #if PLATFORM(IOS) 92 void setAllowsDecodingSecKeyRef(bool); 93 #endif 94 91 95 CFTypeRef tokenNullTypeRef(); 92 96
Note:
See TracChangeset
for help on using the changeset viewer.