Changeset 248319 in webkit


Ignore:
Timestamp:
Aug 6, 2019 3:12:48 PM (5 years ago)
Author:
jiewen_tan@apple.com
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):

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r248316 r248319  
     12019-08-06  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Unreviewed, a build fix after r248308
     4
     5        Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
     6
     7        * wtf/Platform.h:
     8
    192019-08-06  Chris Dumez  <cdumez@apple.com>
    210
  • trunk/Source/WTF/wtf/Platform.h

    r248308 r248319  
    16291629#define HAVE_DEVICE_IDENTITY 1
    16301630#endif
     1631
     1632#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500) || (PLATFORM(IOS_FAMILY) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000)
     1633#define HAVE_DATA_PROTECTION_KEYCHAIN 1
     1634#endif
  • trunk/Source/WebKit/ChangeLog

    r248318 r248319  
     12019-08-06  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Unreviewed, a build fix after r248308
     4
     5        Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
     6
     7        * UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm:
     8        (WebKit::LocalAuthenticator::makeCredential):
     9        (WebKit::LocalAuthenticator::continueMakeCredentialAfterUserConsented):
     10        (WebKit::LocalAuthenticator::continueMakeCredentialAfterAttested):
     11        (WebKit::LocalAuthenticator::getAssertion):
     12        (WebKit::LocalAuthenticator::continueGetAssertionAfterUserConsented):
     13
    1142019-08-06  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalAuthenticator.mm

    r248318 r248319  
    120120            (id)kSecReturnAttributes: @YES,
    121121            (id)kSecMatchLimit: (id)kSecMatchLimitAll,
    122 ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     122#if HAVE_DATA_PROTECTION_KEYCHAIN
     123            (id)kSecUseDataProtectionKeychain: @YES
     124#else
    123125            (id)kSecAttrNoLegacy: @YES
    124 ALLOW_DEPRECATED_DECLARATIONS_END
     126#endif
    125127        };
    126128        CFTypeRef attributesArrayRef = nullptr;
     
    174176        (id)kSecAttrLabel: requestData().creationOptions.rp.id,
    175177        (id)kSecAttrApplicationTag: [NSData dataWithBytes:requestData().creationOptions.user.idVector.data() length:requestData().creationOptions.user.idVector.size()],
     178#if HAVE_DATA_PROTECTION_KEYCHAIN
     179        (id)kSecUseDataProtectionKeychain: @YES
     180#else
    176181        (id)kSecAttrNoLegacy: @YES
     182#endif
    177183    };
    178184    OSStatus status = SecItemDelete((__bridge CFDictionaryRef)deleteQuery);
     
    230236            (id)kSecAttrLabel: label,
    231237            (id)kSecReturnAttributes: @YES,
     238#if HAVE_DATA_PROTECTION_KEYCHAIN
     239            (id)kSecUseDataProtectionKeychain: @YES
     240#else
    232241            (id)kSecAttrNoLegacy: @YES
     242#endif
    233243        };
    234244        CFTypeRef attributesRef = nullptr;
     
    248258            (id)kSecAttrKeyClass: (id)kSecAttrKeyClassPrivate,
    249259            (id)kSecAttrApplicationLabel: nsAttributes[(id)kSecAttrApplicationLabel],
     260#if HAVE_DATA_PROTECTION_KEYCHAIN
     261            (id)kSecUseDataProtectionKeychain: @YES
     262#else
    250263            (id)kSecAttrNoLegacy: @YES
     264#endif
    251265        };
    252266        NSDictionary *updateParams = @{
     
    351365        (id)kSecReturnAttributes: @YES,
    352366        (id)kSecMatchLimit: (id)kSecMatchLimitAll,
     367#if HAVE_DATA_PROTECTION_KEYCHAIN
     368        (id)kSecUseDataProtectionKeychain: @YES
     369#else
    353370        (id)kSecAttrNoLegacy: @YES
     371#endif
    354372    };
    355373    CFTypeRef attributesArrayRef = nullptr;
     
    430448            (id)kSecUseAuthenticationContext: context,
    431449            (id)kSecReturnRef: @YES,
     450#if HAVE_DATA_PROTECTION_KEYCHAIN
     451            (id)kSecUseDataProtectionKeychain: @YES
     452#else
    432453            (id)kSecAttrNoLegacy: @YES
     454#endif
    433455        };
    434456        CFTypeRef privateKeyRef = nullptr;
  • trunk/Tools/ChangeLog

    r248317 r248319  
     12019-08-06  Jiewen Tan  <jiewen_tan@apple.com>
     2
     3        Unreviewed, a build fix after r248308
     4
     5        Use kSecUseDataProtectionKeychain for iOS 13 and macOS Catalina or newer.
     6
     7        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
     8        (WTR::TestController::addTestKeyToKeychain):
     9        (WTR::TestController::cleanUpKeychain):
     10        (WTR::TestController::keyExistsInKeychain):
     11
    1122019-08-06  Keith Rollin  <krollin@apple.com>
    213
  • trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

    r248308 r248319  
    349349        (id)kSecAttrLabel: attrLabel,
    350350        (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(),
     351#if HAVE_DATA_PROTECTION_KEYCHAIN
     352        (id)kSecUseDataProtectionKeychain: @YES
     353#else
    351354        (id)kSecAttrNoLegacy: @YES
     355#endif
    352356    };
    353357    OSStatus status = SecItemAdd((__bridge CFDictionaryRef)addQuery, NULL);
     
    360364        (id)kSecClass: (id)kSecClassKey,
    361365        (id)kSecAttrLabel: attrLabel,
     366#if HAVE_DATA_PROTECTION_KEYCHAIN
     367        (id)kSecUseDataProtectionKeychain: @YES
     368#else
    362369        (id)kSecAttrNoLegacy: @YES
     370#endif
    363371    };
    364372    SecItemDelete((__bridge CFDictionaryRef)deleteQuery);
     
    372380        (id)kSecAttrLabel: attrLabel,
    373381        (id)kSecAttrApplicationTag: adoptNS([[NSData alloc] initWithBase64EncodedString:applicationTagBase64 options:NSDataBase64DecodingIgnoreUnknownCharacters]).get(),
     382#if HAVE_DATA_PROTECTION_KEYCHAIN
     383        (id)kSecUseDataProtectionKeychain: @YES
     384#else
    374385        (id)kSecAttrNoLegacy: @YES
     386#endif
    375387    };
    376388    OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, NULL);
Note: See TracChangeset for help on using the changeset viewer.