Title: [250688] branches/safari-608-branch
Revision
250688
Author
[email protected]
Date
2019-10-03 16:07:52 -0700 (Thu, 03 Oct 2019)

Log Message

Cherry-pick r248319. rdar://problem/55964805

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248319 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WTF/ChangeLog (250687 => 250688)


--- branches/safari-608-branch/Source/WTF/ChangeLog	2019-10-03 23:07:46 UTC (rev 250687)
+++ branches/safari-608-branch/Source/WTF/ChangeLog	2019-10-03 23:07:52 UTC (rev 250688)
@@ -1,5 +1,43 @@
 2019-10-03  Alan Coon  <[email protected]>
 
+        Cherry-pick r248319. rdar://problem/55964805
+
+    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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-06  Jiewen Tan  <[email protected]>
+
+            Unreviewed, a build fix after r248308
+
+            Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
+
+            * wtf/Platform.h:
+
+2019-10-03  Alan Coon  <[email protected]>
+
         Cherry-pick r248308. rdar://problem/55964805
 
     [WebAuthN] Enable LocalAuthenticator for macOS

Modified: branches/safari-608-branch/Source/WTF/wtf/Platform.h (250687 => 250688)


--- branches/safari-608-branch/Source/WTF/wtf/Platform.h	2019-10-03 23:07:46 UTC (rev 250687)
+++ branches/safari-608-branch/Source/WTF/wtf/Platform.h	2019-10-03 23:07:52 UTC (rev 250688)
@@ -1636,3 +1636,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: branches/safari-608-branch/Source/WebKit/ChangeLog (250687 => 250688)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-10-03 23:07:46 UTC (rev 250687)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-10-03 23:07:52 UTC (rev 250688)
@@ -1,5 +1,48 @@
 2019-10-03  Alan Coon  <[email protected]>
 
+        Cherry-pick r248319. rdar://problem/55964805
+
+    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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-06  Jiewen Tan  <[email protected]>
+
+            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-10-03  Alan Coon  <[email protected]>
+
         Cherry-pick r248308. rdar://problem/55964805
 
     [WebAuthN] Enable LocalAuthenticator for macOS

Modified: branches/safari-608-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm (250687 => 250688)


--- branches/safari-608-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm	2019-10-03 23:07:46 UTC (rev 250687)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm	2019-10-03 23:07:52 UTC (rev 250688)
@@ -119,7 +119,11 @@
             (id)kSecAttrLabel: requestData().creationOptions.rp.id,
             (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);
@@ -171,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) {
@@ -227,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);
@@ -245,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,
@@ -348,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);
@@ -427,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: branches/safari-608-branch/Tools/ChangeLog (250687 => 250688)


--- branches/safari-608-branch/Tools/ChangeLog	2019-10-03 23:07:46 UTC (rev 250687)
+++ branches/safari-608-branch/Tools/ChangeLog	2019-10-03 23:07:52 UTC (rev 250688)
@@ -1,5 +1,46 @@
 2019-10-03  Alan Coon  <[email protected]>
 
+        Cherry-pick r248319. rdar://problem/55964805
+
+    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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248319 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-08-06  Jiewen Tan  <[email protected]>
+
+            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-10-03  Alan Coon  <[email protected]>
+
         Cherry-pick r248308. rdar://problem/55964805
 
     [WebAuthN] Enable LocalAuthenticator for macOS

Modified: branches/safari-608-branch/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm (250687 => 250688)


--- branches/safari-608-branch/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2019-10-03 23:07:46 UTC (rev 250687)
+++ branches/safari-608-branch/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm	2019-10-03 23:07:52 UTC (rev 250688)
@@ -350,7 +350,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);
@@ -361,7 +365,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);
 }
@@ -373,7 +381,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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to