diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /dom/webauthn | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webauthn')
-rw-r--r-- | dom/webauthn/MacOSWebAuthnService.mm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/dom/webauthn/MacOSWebAuthnService.mm b/dom/webauthn/MacOSWebAuthnService.mm index fc08ee1a48..24fad770c8 100644 --- a/dom/webauthn/MacOSWebAuthnService.mm +++ b/dom/webauthn/MacOSWebAuthnService.mm @@ -941,6 +941,17 @@ void MacOSWebAuthnService::DoGetAssertion( Unused << aArgs->GetAllowList(allowList); Unused << aArgs->GetAllowListTransports(allowListTransports); } + // Compute the union of the transport sets. + uint8_t transports = 0; + for (uint8_t credTransports : allowListTransports) { + if (credTransports == 0) { + // treat the empty transport set as "all transports". + transports = ~0; + break; + } + transports |= credTransports; + } + NSMutableArray* platformAllowedCredentials = [[NSMutableArray alloc] init]; for (const auto& allowedCredentialId : allowList) { @@ -999,6 +1010,15 @@ void MacOSWebAuthnService::DoGetAssertion( platformAssertionRequest.userVerificationPreference = *userVerificationPreference; } + if (__builtin_available(macos 13.5, *)) { + // Show the hybrid transport option if (1) we have no transport hints + // or (2) at least one allow list entry lists the hybrid transport. + bool shouldShowHybridTransport = + !transports || + (transports & MOZ_WEBAUTHN_AUTHENTICATOR_TRANSPORT_ID_HYBRID); + platformAssertionRequest.shouldShowHybridTransport = + shouldShowHybridTransport; + } // Initialize the cross-platform provider with the rpId. ASAuthorizationSecurityKeyPublicKeyCredentialProvider* |