Changeset 248308 in webkit
- Timestamp:
- Aug 6, 2019, 12:54:43 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 16 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk2/TestExpectations (modified) (1 diff)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/Platform.h (modified) (1 diff)
-
Source/WTF/wtf/spi/cocoa/SecuritySPI.h (modified) (2 diffs)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/Configurations/WebKit.xcconfig (modified) (1 diff)
-
Source/WebKit/Platform/spi/Cocoa/DeviceIdentitySPI.h (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm (modified) (16 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm (modified) (4 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.mm (modified) (2 diffs)
-
Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/WebKitTestRunner/Configurations/WebKitTestRunner.entitlements (added)
-
Tools/WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig (modified) (1 diff)
-
Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj (modified) (5 diffs)
-
Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r248306 r248308 1 2019-08-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthN] Enable LocalAuthenticator for macOS 4 https://bugs.webkit.org/show_bug.cgi?id=182772 5 <rdar://problem/43347920> 6 7 Reviewed by Brent Fulgham. 8 9 Enable existing local authenticator tests for macOS. Since OpenSource bots 10 don't have the internal setting to include restricted entitlements, tests 11 will fail on OpenSource bots. 12 13 * platform/mac-wk2/TestExpectations: 14 1 15 2019-08-06 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r248283 r248308 904 904 webkit.org/b/189598 compositing/backing/backing-store-attachment-fill-forwards-animation.html [ Pass Failure ] 905 905 906 # Skip local authenticator tests for mac now.907 http/wpt/webauthn/public-key-credential-create-failure-local.https.html [ Skip ] 908 http/wpt/webauthn/public-key-credential-create- success-local.https.html [ Skip]909 http/wpt/webauthn/public-key-credential- get-failure-local.https.html [ Skip]910 http/wpt/webauthn/public-key-credential-get- success-local.https.html [ Skip]911 # The following tests require PublicKeyCredential objects. We can only produce them via local authenticators now. 912 http/wpt/credential-management/credentialscontainer-store-basics.https.html [ Skip]913 http/wpt/webauthn/idl.https.html [ Skip]906 # Local authenticator tests require restricted keychain entitlement, which cannot be signed with ad hoc signing. 907 # Therefore, tests fail on OpenSource bots. They will be covered by Internal bots. 908 http/wpt/webauthn/public-key-credential-create-failure-local.https.html [ Failure ] 909 http/wpt/webauthn/public-key-credential-create-success-local.https.html [ Failure ] 910 http/wpt/webauthn/public-key-credential-get-failure-local.https.html [ Failure ] 911 http/wpt/webauthn/public-key-credential-get-success-local.https.html [ Failure ] 912 http/wpt/credential-management/credentialscontainer-store-basics.https.html [ Failure ] 913 http/wpt/webauthn/idl.https.html [ Failure ] 914 914 915 915 webkit.org/b/183878 media/modern-media-controls/tracks-panel/tracks-panel-up-click-over-media-does-not-dimiss-media-controls-when-media-is-playing.html [ Pass Timeout ] -
trunk/Source/WTF/ChangeLog
r248294 r248308 1 2019-08-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthN] Enable LocalAuthenticator for macOS 4 https://bugs.webkit.org/show_bug.cgi?id=182772 5 <rdar://problem/43347920> 6 7 Reviewed by Brent Fulgham. 8 9 * wtf/Platform.h: 10 Adds HAVE_DEVICE_IDENTITY. 11 * wtf/spi/cocoa/SecuritySPI.h: 12 Adds a SPI for telling macOS keychain to use the modern one. 13 1 14 2019-08-06 Claudio Saavedra <csaavedra@igalia.com> 2 15 -
trunk/Source/WTF/wtf/Platform.h
r248071 r248308 1625 1625 #define USE_HIRAGINO_SANS_WORKAROUND 1 1626 1626 #endif 1627 1628 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)) 1629 #define HAVE_DEVICE_IDENTITY 1 1630 #endif -
trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h
r247117 r248308 31 31 #include <Security/SecCertificatePriv.h> 32 32 #include <Security/SecIdentityPriv.h> 33 #include <Security/SecItemPriv.h> 33 34 #include <Security/SecKeyPriv.h> 34 35 #include <Security/SecTask.h> … … 63 64 64 65 SecSignatureHashAlgorithm SecCertificateGetSignatureHashAlgorithm(SecCertificateRef); 66 extern const CFStringRef kSecAttrNoLegacy; 65 67 66 68 WTF_EXTERN_C_END 67 69 68 #endif 70 #endif // USE(APPLE_INTERNAL_SDK) 69 71 70 72 typedef struct __SecTask *SecTaskRef; -
trunk/Source/WebKit/ChangeLog
r248302 r248308 1 2019-08-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthN] Enable LocalAuthenticator for macOS 4 https://bugs.webkit.org/show_bug.cgi?id=182772 5 <rdar://problem/43347920> 6 7 Reviewed by Brent Fulgham. 8 9 This patch enables LocalAuthenticator for macOS. The majority 10 of this patch is to tweak macOS keychain to use the modern one. 11 12 * Configurations/WebKit.xcconfig: 13 * Platform/spi/Cocoa/DeviceIdentitySPI.h: 14 * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm: 15 (WebKit::LocalAuthenticatorInternal::toVector): 16 (WebKit::LocalAuthenticator::makeCredential): 17 (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented): 18 (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested): 19 (WebKit::LocalAuthenticator::getAssertion): 20 (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented): 21 * UIProcess/WebAuthentication/Cocoa/LocalConnection.mm: 22 (WebKit::LocalConnection::getUserConsent const): 23 (WebKit::LocalConnection::getAttestation const): 24 * UIProcess/WebAuthentication/Cocoa/LocalService.mm: 25 (WebKit::LocalService::isAvailable): 26 * UIProcess/WebAuthentication/Mock/MockLocalConnection.mm: 27 (WebKit::MockLocalConnection::getAttestation const): 28 * config.h: 29 1 30 2019-08-06 Jer Noble <jer.noble@apple.com> 2 31 -
trunk/Source/WebKit/Configurations/WebKit.xcconfig
r246892 r248308 173 173 WK_RELOCATABLE_FRAMEWORK_LDFLAGS_YES_macosx = -Wl,-not_for_dyld_shared_cache; 174 174 175 WK_HAVE_DEVICE_IDENTITY = $(WK_HAVE_DEVICE_IDENTITY_$( PLATFORM_NAME));175 WK_HAVE_DEVICE_IDENTITY = $(WK_HAVE_DEVICE_IDENTITY_$(WK_PLATFORM_NAME)); 176 176 WK_HAVE_DEVICE_IDENTITY_iphoneos = YES; 177 WK_HAVE_DEVICE_IDENTITY_macosx = $(WK_HAVE_DEVICE_IDENTITY$(WK_MACOS_1014)); 178 WK_HAVE_DEVICE_IDENTITY_MACOS_SINCE_1014 = YES; 177 179 178 180 WK_HAVE_URL_FORMATTING = $(WK_HAVE_URL_FORMATTING_$(WK_PLATFORM_NAME)); -
trunk/Source/WebKit/Platform/spi/Cocoa/DeviceIdentitySPI.h
r237607 r248308 28 28 #if ENABLE(WEB_AUTHN) 29 29 30 #if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)30 #if HAVE(DEVICE_IDENTITY) 31 31 32 32 #if USE(APPLE_INTERNAL_SDK) … … 55 55 #endif // USE(APPLE_INTERNAL_SDK) 56 56 57 #endif // PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR)57 #endif // HAVE(DEVICE_IDENTITY) 58 58 59 59 #endif // ENABLE(WEB_AUTHN) -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm
r245638 r248308 42 42 #import <wtf/RunLoop.h> 43 43 #import <wtf/Vector.h> 44 #import <wtf/spi/cocoa/SecuritySPI.h> 44 45 #import <wtf/text/StringHash.h> 45 46 … … 55 56 const uint16_t credentialIdLength = 20; 56 57 57 #if PLATFORM(IOS_FAMILY)58 58 static inline bool emptyTransportsOrContain(const Vector<AuthenticatorTransport>& transports, AuthenticatorTransport target) 59 59 { … … 79 79 return result; 80 80 } 81 #endif // !PLATFORM(IOS_FAMILY)82 81 83 82 } // LocalAuthenticatorInternal … … 90 89 void LocalAuthenticator::makeCredential() 91 90 { 92 // FIXME(182772)93 91 using namespace LocalAuthenticatorInternal; 94 92 ASSERT(m_state == State::Init); 95 93 m_state = State::RequestReceived; 96 94 97 #if PLATFORM(IOS_FAMILY)98 95 // The following implements https://www.w3.org/TR/webauthn/#op-make-cred as of 5 December 2017. 99 96 // Skip Step 4-5 as requireResidentKey and requireUserVerification are enforced. … … 123 120 (id)kSecReturnAttributes: @YES, 124 121 (id)kSecMatchLimit: (id)kSecMatchLimitAll, 122 (id)kSecAttrNoLegacy: @YES 125 123 }; 126 124 CFTypeRef attributesArrayRef = nullptr; … … 153 151 }; 154 152 m_connection->getUserConsent( 155 " Allow " + requestData().creationOptions.rp.id + " to create a public key credential for " + requestData().creationOptions.user.name,153 "allow " + requestData().creationOptions.rp.id + " to create a public key credential for " + requestData().creationOptions.user.name, 156 154 WTFMove(callback)); 157 #endif // !PLATFORM(IOS_FAMILY)158 155 } 159 156 160 157 void LocalAuthenticator::continueMakeCredentialAfterUserConsented(LocalConnection::UserConsent consent) 161 158 { 162 // FIXME(182772)163 159 ASSERT(m_state == State::RequestReceived); 164 160 m_state = State::UserConsented; 165 161 166 #if PLATFORM(IOS_FAMILY)167 162 if (consent == LocalConnection::UserConsent::No) { 168 163 receiveRespond(ExceptionData { NotAllowedError, "Couldn't get user consent."_s }); … … 177 172 (id)kSecAttrLabel: requestData().creationOptions.rp.id, 178 173 (id)kSecAttrApplicationTag: [NSData dataWithBytes:requestData().creationOptions.user.idVector.data() length:requestData().creationOptions.user.idVector.size()], 174 (id)kSecAttrNoLegacy: @YES 179 175 }; 180 176 OSStatus status = SecItemDelete((__bridge CFDictionaryRef)deleteQuery); … … 193 189 }; 194 190 m_connection->getAttestation(requestData().creationOptions.rp.id, requestData().creationOptions.user.name, requestData().hash, WTFMove(callback)); 195 #endif // !PLATFORM(IOS_FAMILY)196 191 } 197 192 198 193 void LocalAuthenticator::continueMakeCredentialAfterAttested(SecKeyRef privateKey, NSArray *certificates, NSError *error) 199 194 { 200 // FIXME(182772)201 195 using namespace LocalAuthenticatorInternal; 202 196 … … 204 198 m_state = State::Attested; 205 199 206 #if PLATFORM(IOS_FAMILY)207 200 if (error) { 208 201 LOG_ERROR("Couldn't attest: %@", error); … … 228 221 Vector<uint8_t> credentialId; 229 222 { 230 // -rk is added by DeviceIdentity.Framework.231 String label = makeString(requestData().creationOptions.user.name, "@", requestData().creationOptions.rp.id, "-rk ");223 // -rk-ucrt is added by DeviceIdentity.Framework. 224 String label = makeString(requestData().creationOptions.user.name, "@", requestData().creationOptions.rp.id, "-rk-ucrt"); 232 225 NSDictionary *credentialIdQuery = @{ 233 226 (id)kSecClass: (id)kSecClassKey, 234 227 (id)kSecAttrKeyClass: (id)kSecAttrKeyClassPrivate, 235 228 (id)kSecAttrLabel: label, 236 (id)kSecReturnAttributes: @YES 229 (id)kSecReturnAttributes: @YES, 230 (id)kSecAttrNoLegacy: @YES 237 231 }; 238 232 CFTypeRef attributesRef = nullptr; … … 252 246 (id)kSecAttrKeyClass: (id)kSecAttrKeyClassPrivate, 253 247 (id)kSecAttrApplicationLabel: nsAttributes[(id)kSecAttrApplicationLabel], 248 (id)kSecAttrNoLegacy: @YES 254 249 }; 255 250 NSDictionary *updateParams = @{ … … 328 323 329 324 receiveRespond(PublicKeyCredentialData { ArrayBuffer::create(credentialId.data(), credentialId.size()), true, nullptr, ArrayBuffer::create(attestationObject.data(), attestationObject.size()), nullptr, nullptr, nullptr, WTF::nullopt }); 330 #endif // !PLATFORM(IOS_FAMILY)331 325 } 332 326 333 327 void LocalAuthenticator::getAssertion() 334 328 { 335 // FIXME(182772)336 329 using namespace LocalAuthenticatorInternal; 337 330 ASSERT(m_state == State::Init); 338 331 m_state = State::RequestReceived; 339 332 340 #if PLATFORM(IOS_FAMILY)341 333 // The following implements https://www.w3.org/TR/webauthn/#op-get-assertion as of 5 December 2017. 342 334 // Skip Step 2 as requireUserVerification is enforced. … … 356 348 (id)kSecAttrLabel: requestData().requestOptions.rpId, 357 349 (id)kSecReturnAttributes: @YES, 358 (id)kSecMatchLimit: (id)kSecMatchLimitAll 350 (id)kSecMatchLimit: (id)kSecMatchLimitAll, 351 (id)kSecAttrNoLegacy: @YES 359 352 }; 360 353 CFTypeRef attributesArrayRef = nullptr; … … 402 395 }; 403 396 NSData *idData = selectedCredentialAttributes[(id)kSecAttrApplicationTag]; 404 StringView idStringView { static_cast<const LChar*>([idData bytes]), static_cast<unsigned>([idData length]) };397 StringView idStringView { static_cast<const UChar*>([idData bytes]), static_cast<unsigned>([idData length]) }; 405 398 m_connection->getUserConsent( 406 makeString(" Log into ", requestData().requestOptions.rpId, " with ", idStringView, '.'),399 makeString("log into ", requestData().requestOptions.rpId, " with ", idStringView), 407 400 (__bridge SecAccessControlRef)selectedCredentialAttributes[(id)kSecAttrAccessControl], 408 401 WTFMove(callback)); 409 #endif // PLATFORM(IOS_FAMILY)410 402 } 411 403 412 404 void LocalAuthenticator::continueGetAssertionAfterUserConsented(LocalConnection::UserConsent consent, LAContext *context, const Vector<uint8_t>& credentialId, const Vector<uint8_t>& userhandle) 413 405 { 414 // FIXME(182772)415 406 using namespace LocalAuthenticatorInternal; 416 407 ASSERT(m_state == State::RequestReceived); 417 408 m_state = State::UserConsented; 418 409 419 #if PLATFORM(IOS_FAMILY)420 410 if (consent == LocalConnection::UserConsent::No) { 421 411 receiveRespond(ExceptionData { NotAllowedError, "Couldn't get user consent."_s }); … … 438 428 (id)kSecUseAuthenticationContext: context, 439 429 (id)kSecReturnRef: @YES, 430 (id)kSecAttrNoLegacy: @YES 440 431 }; 441 432 CFTypeRef privateKeyRef = nullptr; … … 465 456 // Step 13. 466 457 receiveRespond(PublicKeyCredentialData { ArrayBuffer::create(credentialId.data(), credentialId.size()), false, nullptr, nullptr, ArrayBuffer::create(authData.data(), authData.size()), ArrayBuffer::create(signature.data(), signature.size()), ArrayBuffer::create(userhandle.data(), userhandle.size()), WTF::nullopt }); 467 #endif // !PLATFORM(IOS_FAMILY)468 458 } 469 459 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalConnection.mm
r248190 r248308 40 40 void LocalConnection::getUserConsent(const String& reason, UserConsentCallback&& completionHandler) const 41 41 { 42 // FIXME(182772)43 #if PLATFORM(IOS_FAMILY)44 42 auto context = adoptNS([allocLAContextInstance() init]); 45 43 auto reply = makeBlockPtr([completionHandler = WTFMove(completionHandler)] (BOOL success, NSError *error) mutable { … … 56 54 }); 57 55 [context evaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics localizedReason:reason reply:reply.get()]; 58 #endif59 56 } 60 57 61 58 void LocalConnection::getUserConsent(const String& reason, SecAccessControlRef accessControl, UserConsentContextCallback&& completionHandler) const 62 59 { 63 // FIXME(182772)64 #if PLATFORM(IOS_FAMILY)65 60 auto context = adoptNS([allocLAContextInstance() init]); 66 61 auto reply = makeBlockPtr([context, completionHandler = WTFMove(completionHandler)] (BOOL success, NSError *error) mutable { … … 77 72 }); 78 73 [context evaluateAccessControl:accessControl operation:LAAccessControlOperationUseKeySign localizedReason:reason reply:reply.get()]; 79 #endif80 74 } 81 75 82 76 void LocalConnection::getAttestation(const String& rpId, const String& username, const Vector<uint8_t>& hash, AttestationCallback&& completionHandler) const 83 77 { 84 // DeviceIdentity.Framework is not avaliable in iOS simulator. 85 #if PLATFORM(IOS_FAMILY) && !PLATFORM(IOS_FAMILY_SIMULATOR) 78 #if HAVE(DEVICE_IDENTITY) 86 79 // Apple Attestation 87 80 ASSERT(hash.size() <= 32); … … 115 108 // FIXME(183652): Reduce prompt for biometrics 116 109 DeviceIdentityIssueClientCertificateWithCompletion(dispatch_get_main_queue(), options, makeBlockPtr(WTFMove(completionHandler)).get()); 117 #endif 110 #endif // HAVE(DEVICE_IDENTITY) 118 111 } 119 112 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.mm
r239689 r248308 42 42 } 43 43 44 // FIXME(rdar://problem/51048542) 44 45 bool LocalService::isAvailable() 45 46 { 46 // FIXME(182772) 47 #if !PLATFORM(IOS_FAMILY) 48 return false; 49 #else 47 // FIXME(198176) 50 48 if (!WebCore::RuntimeEnabledFeatures::sharedFeatures().webAuthenticationLocalAuthenticatorEnabled()) 51 49 return false; … … 58 56 } 59 57 return true; 60 #endif61 58 } 62 59 -
trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockLocalConnection.mm
r236686 r248308 93 93 94 94 // Mock what DeviceIdentity would do. 95 String label = makeString(username, "@", rpId, "-rk ");95 String label = makeString(username, "@", rpId, "-rk-ucrt"); 96 96 NSDictionary* addQuery = @{ 97 97 (id)kSecValueRef: (id)key.get(), -
trunk/Tools/ChangeLog
r248305 r248308 1 2019-08-06 Jiewen Tan <jiewen_tan@apple.com> 2 3 [WebAuthN] Enable LocalAuthenticator for macOS 4 https://bugs.webkit.org/show_bug.cgi?id=182772 5 <rdar://problem/43347920> 6 7 Reviewed by Brent Fulgham. 8 9 Add an entitlement file to WebKitTestRunner such that it can access 10 the modern macOS keychain. 11 12 * WebKitTestRunner/Configurations/WebKitTestRunner.entitlements: Added. 13 * WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig: 14 * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: 15 * WebKitTestRunner/cocoa/TestControllerCocoa.mm: 16 (WTR::TestController::addTestKeyToKeychain): 17 (WTR::TestController::cleanUpKeychain): 18 (WTR::TestController::keyExistsInKeychain): 19 1 20 2019-08-06 Zhifei Fang <zhifei_fang@apple.com> 2 21 -
trunk/Tools/WebKitTestRunner/Configurations/WebKitTestRunner.xcconfig
r246282 r248308 35 35 EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = mac/*; 36 36 INCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = mac/main.mm; 37 38 CODE_SIGN_ENTITLEMENTS[sdk=macosx*] = Configurations/WebKitTestRunner.entitlements; 39 40 CODE_SIGN_IDENTITY[sdk=macosx*] = $(CODE_SIGN_IDENTITY_$(USE_INTERNAL_SDK)); 41 CODE_SIGN_IDENTITY_YES = $(WK_ENGINEERING_CODE_SIGN_IDENTITY); -
trunk/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
r247898 r248308 106 106 5664A49A14326384008881BE /* TextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5664A49814326384008881BE /* TextInputController.cpp */; }; 107 107 5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */; }; 108 570E75A82152DB4F00324B6E /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570E75A42152DA2C00324B6E /* Security.framework */; }; 108 57A0062E22976EEB00AD08BD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570E75A42152DA2C00324B6E /* Security.framework */; }; 109 57A0062F22976EF800AD08BD /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 570E75A42152DA2C00324B6E /* Security.framework */; }; 109 110 6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; }; 110 111 6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; }; … … 324 325 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventSenderProxy.mm; sourceTree = "<group>"; }; 325 326 570E75A42152DA2C00324B6E /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 327 57A0062C22976E4D00AD08BD /* WebKitTestRunner.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = WebKitTestRunner.entitlements; sourceTree = "<group>"; }; 326 328 583913D014335E95008307E5 /* JSAccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAccessibilityController.cpp; sourceTree = "<group>"; }; 327 329 583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAccessibilityController.h; sourceTree = "<group>"; }; … … 418 420 buildActionMask = 2147483647; 419 421 files = ( 420 57 0E75A82152DB4F00324B6E/* Security.framework in Frameworks */,422 57A0062F22976EF800AD08BD /* Security.framework in Frameworks */, 421 423 ); 422 424 runOnlyForDeploymentPostprocessing = 0; … … 427 429 files = ( 428 430 51058AD51D678820009A538C /* libWebCoreTestSupport.dylib in Frameworks */, 431 57A0062E22976EEB00AD08BD /* Security.framework in Frameworks */, 429 432 51058AD61D678825009A538C /* WebKit.framework in Frameworks */, 430 433 ); … … 807 810 BC25197111D15E61002EBC01 /* InjectedBundle.xcconfig */, 808 811 A1B89B94221E026B00EB4CEA /* SDKVariant.xcconfig */, 812 57A0062C22976E4D00AD08BD /* WebKitTestRunner.entitlements */, 809 813 A18510381B9ADF2200744AEB /* WebKitTestRunner.xcconfig */, 810 814 9B0D132E2036D346008FC8FB /* WebKitTestRunnerApp-iOS.entitlements */, -
trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
r246118 r248308 52 52 #import <WebKit/_WKUserContentExtensionStorePrivate.h> 53 53 #import <wtf/MainThread.h> 54 #import <wtf/spi/cocoa/SecuritySPI.h> 54 55 55 56 namespace WTR { … … 330 331 void TestController::addTestKeyToKeychain(const String& privateKeyBase64, const String& attrLabel, const String& applicationTagBase64) 331 332 { 332 // FIXME(182772)333 #if PLATFORM(IOS_FAMILY)334 333 NSDictionary* options = @{ 335 334 (id)kSecAttrKeyType: (id)kSecAttrKeyTypeECSECPrimeRandom, … … 349 348 (id)kSecClass: (id)kSecClassKey, 350 349 (id)kSecAttrLabel: attrLabel, 351 (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get() 350 (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(), 351 (id)kSecAttrNoLegacy: @YES 352 352 }; 353 353 OSStatus status = SecItemAdd((__bridge CFDictionaryRef)addQuery, NULL); 354 354 ASSERT_UNUSED(status, !status); 355 #endif356 355 } 357 356 358 357 void TestController::cleanUpKeychain(const String& attrLabel) 359 358 { 360 // FIXME(182772)361 #if PLATFORM(IOS_FAMILY)362 359 NSDictionary* deleteQuery = @{ 363 360 (id)kSecClass: (id)kSecClassKey, 364 (id)kSecAttrLabel: attrLabel 361 (id)kSecAttrLabel: attrLabel, 362 (id)kSecAttrNoLegacy: @YES 365 363 }; 366 364 SecItemDelete((__bridge CFDictionaryRef)deleteQuery); 367 #endif368 365 } 369 366 370 367 bool TestController::keyExistsInKeychain(const String& attrLabel, const String& applicationTagBase64) 371 368 { 372 // FIXME(182772)373 #if PLATFORM(IOS_FAMILY)374 369 NSDictionary *query = @{ 375 370 (id)kSecClass: (id)kSecClassKey, … … 377 372 (id)kSecAttrLabel: attrLabel, 378 373 (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(), 374 (id)kSecAttrNoLegacy: @YES 379 375 }; 380 376 OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, NULL); … … 382 378 return true; 383 379 ASSERT(status == errSecItemNotFound); 384 #endif385 380 return false; 386 381 }
Note:
See TracChangeset
for help on using the changeset viewer.