Title: [283837] trunk/Source/WebKit
- Revision
- 283837
- Author
- [email protected]
- Date
- 2021-10-08 14:03:32 -0700 (Fri, 08 Oct 2021)
Log Message
Update getAllLocalAuthenticatorCredentials query according to internal needs
https://bugs.webkit.org/show_bug.cgi?id=231439
rdar://84032359
Patch by John Pascoe <[email protected]> on 2021-10-08
Reviewed by Tim Horton.
Covered by manual tests.
* UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
(updateQueryIfNecessary):
(getAllLocalAuthenticatorCredentialsImpl):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (283836 => 283837)
--- trunk/Source/WebKit/ChangeLog 2021-10-08 21:02:38 UTC (rev 283836)
+++ trunk/Source/WebKit/ChangeLog 2021-10-08 21:03:32 UTC (rev 283837)
@@ -1,3 +1,17 @@
+2021-10-08 John Pascoe <[email protected]>
+
+ Update getAllLocalAuthenticatorCredentials query according to internal needs
+ https://bugs.webkit.org/show_bug.cgi?id=231439
+ rdar://84032359
+
+ Reviewed by Tim Horton.
+
+ Covered by manual tests.
+
+ * UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm:
+ (updateQueryIfNecessary):
+ (getAllLocalAuthenticatorCredentialsImpl):
+
2021-10-08 Basuke Suzuki <[email protected]>
Fix build break after r283796 when ENABLE_SERVICE_WORKER is off
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm (283836 => 283837)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm 2021-10-08 21:02:38 UTC (rev 283836)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebAuthenticationPanel.mm 2021-10-08 21:03:32 UTC (rev 283837)
@@ -61,6 +61,15 @@
#import <wtf/text/Base64.h>
#if ENABLE(WEB_AUTHN)
+
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/LocalAuthenticatorAdditions.h>
+#else
+static void updateQueryIfNecessary(NSMutableDictionary *)
+{
+}
+#endif
+
static RetainPtr<NSData> produceClientDataJson(_WKWebAuthenticationType type, NSData *challenge, NSString *origin)
{
auto dictionary = adoptNS([[NSMutableDictionary alloc] init]);
@@ -203,7 +212,8 @@
#if ENABLE(WEB_AUTHN)
static RetainPtr<NSArray> getAllLocalAuthenticatorCredentialsImpl(NSString *accessGroup)
{
- NSDictionary *query = @{
+ auto query = adoptNS([[NSMutableDictionary alloc] init]);
+ [query setDictionary:@{
(__bridge id)kSecClass: (__bridge id)kSecClassKey,
(__bridge id)kSecAttrKeyClass: (__bridge id)kSecAttrKeyClassPrivate,
(__bridge id)kSecAttrAccessGroup: accessGroup,
@@ -210,9 +220,11 @@
(__bridge id)kSecReturnAttributes: @YES,
(__bridge id)kSecMatchLimit: (__bridge id)kSecMatchLimitAll,
(__bridge id)kSecUseDataProtectionKeychain: @YES
- };
+ }];
+ updateQueryIfNecessary(query.get());
+
CFTypeRef attributesArrayRef = nullptr;
- OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query, &attributesArrayRef);
+ OSStatus status = SecItemCopyMatching((__bridge CFDictionaryRef)query.get(), &attributesArrayRef);
if (status && status != errSecItemNotFound)
return nullptr;
auto retainAttributesArray = adoptCF(attributesArrayRef);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes