Changeset 171066 in webkit
- Timestamp:
- Jul 14, 2014 9:17:26 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r171061 r171066 1 2014-07-14 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain 4 https://bugs.webkit.org/show_bug.cgi?id=134878 5 6 Reviewed by Sam Weinig. 7 8 Route CFNetwork’s calls to Security API through to the UI process. 9 10 * NetworkProcess/ios/NetworkProcessIOS.mm: 11 (WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim. 12 13 * Shared/mac/SecItemShim.cpp: 14 (WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply 15 CFNetwork with alternate functions to call. 16 17 * Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS). 18 * UIProcess/mac/SecItemShimProxy.messages.in: Ditto. 19 20 * config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well. 21 1 22 2014-07-14 Dan Bernstein <mitz@apple.com> 2 23 -
trunk/Source/WebKit2/NetworkProcess/ios/NetworkProcessIOS.mm
r169533 r171066 31 31 #import "NetworkProcessCreationParameters.h" 32 32 #import "SandboxInitializationParameters.h" 33 #import "SecItemShim.h" 33 34 #import <WebCore/CertificateInfo.h> 34 35 #import <WebCore/NotImplemented.h> … … 80 81 void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters& parameters) 81 82 { 83 #if ENABLE(SEC_ITEM_SHIM) 84 SecItemShim::shared().initialize(this); 85 #endif 82 86 platformInitializeNetworkProcessCocoa(parameters); 83 87 } -
trunk/Source/WebKit2/Shared/mac/SecItemShim.cpp
r169518 r171066 41 41 #include <mutex> 42 42 #include <wtf/NeverDestroyed.h> 43 44 #if __has_include(<CFNetwork/CFURLConnectionPriv.h>) 45 #include <CFNetwork/CFURLConnectionPriv.h> 46 #else 47 struct _CFNFrameworksStubs { 48 CFIndex version; 49 50 OSStatus (*SecItem_stub_CopyMatching)(CFDictionaryRef query, CFTypeRef *result); 51 OSStatus (*SecItem_stub_Add)(CFDictionaryRef attributes, CFTypeRef *result); 52 OSStatus (*SecItem_stub_Update)(CFDictionaryRef query, CFDictionaryRef attributesToUpdate); 53 OSStatus (*SecItem_stub_Delete)(CFDictionaryRef query); 54 }; 55 #endif 56 57 extern "C" void _CFURLConnectionSetFrameworkStubs(const struct _CFNFrameworksStubs* stubs); 43 58 44 59 namespace WebKit { … … 137 152 sharedProcess = process; 138 153 154 #if PLATFORM(IOS) 155 struct _CFNFrameworksStubs stubs = { 156 .version = 0, 157 .SecItem_stub_CopyMatching = webSecItemCopyMatching, 158 .SecItem_stub_Add = webSecItemAdd, 159 .SecItem_stub_Update = webSecItemUpdate, 160 .SecItem_stub_Delete = webSecItemDelete, 161 }; 162 163 _CFURLConnectionSetFrameworkStubs(&stubs); 164 #endif 165 166 #if PLATFORM(MAC) 139 167 const SecItemShimCallbacks callbacks = { 140 168 webSecItemCopyMatching, … … 146 174 SecItemShimInitializeFunc func = reinterpret_cast<SecItemShimInitializeFunc>(dlsym(RTLD_DEFAULT, "WebKitSecItemShimInitialize")); 147 175 func(callbacks); 176 #endif 148 177 } 149 178 -
trunk/Source/WebKit2/Shared/mac/SecItemShim.messages.in
r160117 r171066 21 21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 22 23 #if !PLATFORM(IOS)24 23 messages -> SecItemShim { 25 24 … … 29 28 30 29 } 31 #endif -
trunk/Source/WebKit2/UIProcess/mac/SecItemShimProxy.messages.in
r160117 r171066 21 21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 22 23 #if !PLATFORM(IOS)24 23 messages -> SecItemShimProxy { 25 24 … … 29 28 30 29 } 31 #endif -
trunk/Source/WebKit2/config.h
r171060 r171066 76 76 77 77 #ifndef ENABLE_SEC_ITEM_SHIM 78 #if PLATFORM(MAC) 78 #if PLATFORM(MAC) || PLATFORM(IOS) 79 79 #define ENABLE_SEC_ITEM_SHIM 1 80 80 #endif
Note: See TracChangeset
for help on using the changeset viewer.