Title: [248319] trunk
Revision
248319
Author
jiewen_...@apple.com
Date
2019-08-06 15:12:48 -0700 (Tue, 06 Aug 2019)

Log Message

Unreviewed, a build fix after r248308

Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.

Source/WebKit:

* UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
(WebKit::LocalAuthenticator::makeCredential):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
(WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
(WebKit::LocalAuthenticator::getAssertion):
(WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):

Source/WTF:

* wtf/Platform.h:

Tools:

* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::addTestKeyToKeychain):
(WTR::TestController::cleanUpKeychain):
(WTR::TestController::keyExistsInKeychain):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (248318 => 248319)


--- trunk/Source/WTF/ChangeLog	2019-08-06 22:04:22 UTC (rev 248318)
+++ trunk/Source/WTF/ChangeLog	2019-08-06 22:12:48 UTC (rev 248319)
@@ -1,3 +1,11 @@
+2019-08-06  Jiewen Tan  <jiewen_...@apple.com>
+
+        Unreviewed, a build fix after r248308
+
+        Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
+
+        * wtf/Platform.h:
+
 2019-08-06  Chris Dumez  <cdu...@apple.com>
 
         Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&)

Modified: trunk/Source/WTF/wtf/Platform.h (248318 => 248319)


--- trunk/Source/WTF/wtf/Platform.h	2019-08-06 22:04:22 UTC (rev 248318)
+++ trunk/Source/WTF/wtf/Platform.h	2019-08-06 22:12:48 UTC (rev 248319)
@@ -1628,3 +1628,7 @@
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || (PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR))
 #define HAVE_DEVICE_IDENTITY 1
 #endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
+#define HAVE_DATA_PROTECTION_KEYCHAIN 1
+#endif

Modified: trunk/Source/WebKit/ChangeLog (248318 => 248319)


--- trunk/Source/WebKit/ChangeLog	2019-08-06 22:04:22 UTC (rev 248318)
+++ trunk/Source/WebKit/ChangeLog	2019-08-06 22:12:48 UTC (rev 248319)
@@ -1,3 +1,16 @@
+2019-08-06  Jiewen Tan  <jiewen_...@apple.com>
+
+        Unreviewed, a build fix after r248308
+
+        Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
+
+        * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
+        (WebKit::LocalAuthenticator::makeCredential):
+        (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
+        (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
+        (WebKit::LocalAuthenticator::getAssertion):
+        (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
+
 2019-08-06  Chris Dumez  <cdu...@apple.com>
 
         Unreviewed, fix internal iOS build after r248308.

Modified: trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm (248318 => 248319)


--- trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm	2019-08-06 22:04:22 UTC (rev 248318)
+++ trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm	2019-08-06 22:12:48 UTC (rev 248319)
@@ -119,9 +119,11 @@
             (id)kSecAttrLabel: requestData().creationOptions.rp.id,
             (id)kSecReturnAttributes: @YES,
             (id)kSecMatchLimit: (id)kSecMatchLimitAll,
-ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+            (id)kSecUseDataProtectionKeychain: @YES
+#else
             (id)kSecAttrNoLegacy: @YES
-ALLOW_DEPRECATED_DECLARATIONS_END
+#endif
         };
         CFTypeRef attributesArrayRef = nullptr;
         OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &attributesArrayRef);
@@ -173,7 +175,11 @@
         (id)kSecClass: (id)kSecClassKey,
         (id)kSecAttrLabel: requestData().creationOptions.rp.id,
         (id)kSecAttrApplicationTag: [NSData dataWithBytes:requestData().creationOptions.user.idVector.data() length:requestData().creationOptions.user.idVector.size()],
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+        (id)kSecUseDataProtectionKeychain: @YES
+#else
         (id)kSecAttrNoLegacy: @YES
+#endif
     };
     OSStatus status = SecItemDelete((__bridge CFDictionaryRef)deleteQuery);
     if (status && status != errSecItemNotFound) {
@@ -229,7 +235,11 @@
             (id)kSecAttrKeyClass: (id)kSecAttrKeyClassPrivate,
             (id)kSecAttrLabel: label,
             (id)kSecReturnAttributes: @YES,
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+            (id)kSecUseDataProtectionKeychain: @YES
+#else
             (id)kSecAttrNoLegacy: @YES
+#endif
         };
         CFTypeRef attributesRef = nullptr;
         OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)credentialIdQuery, &attributesRef);
@@ -247,7 +257,11 @@
             (id)kSecClass: (id)kSecClassKey,
             (id)kSecAttrKeyClass: (id)kSecAttrKeyClassPrivate,
             (id)kSecAttrApplicationLabel: nsAttributes[(id)kSecAttrApplicationLabel],
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+            (id)kSecUseDataProtectionKeychain: @YES
+#else
             (id)kSecAttrNoLegacy: @YES
+#endif
         };
         NSDictionary *updateParams = @{
             (id)kSecAttrLabel: requestData().creationOptions.rp.id,
@@ -350,7 +364,11 @@
         (id)kSecAttrLabel: requestData().requestOptions.rpId,
         (id)kSecReturnAttributes: @YES,
         (id)kSecMatchLimit: (id)kSecMatchLimitAll,
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+        (id)kSecUseDataProtectionKeychain: @YES
+#else
         (id)kSecAttrNoLegacy: @YES
+#endif
     };
     CFTypeRef attributesArrayRef = nullptr;
     OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &attributesArrayRef);
@@ -429,7 +447,11 @@
             (id)kSecAttrApplicationLabel: [NSData dataWithBytes:credentialId.data() length:credentialId.size()],
             (id)kSecUseAuthenticationContext: context,
             (id)kSecReturnRef: @YES,
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+            (id)kSecUseDataProtectionKeychain: @YES
+#else
             (id)kSecAttrNoLegacy: @YES
+#endif
         };
         CFTypeRef privateKeyRef = nullptr;
         OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &privateKeyRef);

Modified: trunk/Tools/ChangeLog (248318 => 248319)


--- trunk/Tools/ChangeLog	2019-08-06 22:04:22 UTC (rev 248318)
+++ trunk/Tools/ChangeLog	2019-08-06 22:12:48 UTC (rev 248319)
@@ -1,3 +1,14 @@
+2019-08-06  Jiewen Tan  <jiewen_...@apple.com>
+
+        Unreviewed, a build fix after r248308
+
+        Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
+
+        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
+        (WTR::TestController::addTestKeyToKeychain):
+        (WTR::TestController::cleanUpKeychain):
+        (WTR::TestController::keyExistsInKeychain):
+
 2019-08-06  Keith Rollin  <krol...@apple.com>
 
         Enable XCBuild for `make` and `build-webkit` builds

Modified: trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (248318 => 248319)


--- trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2019-08-06 22:04:22 UTC (rev 248318)
+++ trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2019-08-06 22:12:48 UTC (rev 248319)
@@ -348,7 +348,11 @@
         (id)kSecClass: (id)kSecClassKey,
         (id)kSecAttrLabel: attrLabel,
         (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(),
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+        (id)kSecUseDataProtectionKeychain: @YES
+#else
         (id)kSecAttrNoLegacy: @YES
+#endif
     };
     OSStatus status = SecItemAdd((__bridge CFDictionaryRef)addQuery, NULL);
     ASSERT_UNUSED(status, !status);
@@ -359,7 +363,11 @@
     NSDictionary* deleteQuery = @{
         (id)kSecClass: (id)kSecClassKey,
         (id)kSecAttrLabel: attrLabel,
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+        (id)kSecUseDataProtectionKeychain: @YES
+#else
         (id)kSecAttrNoLegacy: @YES
+#endif
     };
     SecItemDelete((__bridge CFDictionaryRef)deleteQuery);
 }
@@ -371,7 +379,11 @@
         (id)kSecAttrKeyClass: (id)kSecAttrKeyClassPrivate,
         (id)kSecAttrLabel: attrLabel,
         (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(),
+#if HAVE_DATA_PROTECTION_KEYCHAIN
+        (id)kSecUseDataProtectionKeychain: @YES
+#else
         (id)kSecAttrNoLegacy: @YES
+#endif
     };
     OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, NULL);
     if (!status)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to