Commit 11f9ef9e authored by Martin Kreichgauer's avatar Martin Kreichgauer Committed by Commit Bot

fido/win: don't fail if Windows doesn't echo the HmacSecret extension

Windows generally doesn't seem to echo the HmacSecret extension in their
response to AuthenticatorMakeCredential. However, AuthenticatorImpl already
parses the hmacSecret response value out of the authenticator data, so we
should not fail the request over this.

Bug: 898718
Change-Id: I1e732ab189f240df2be09ec89135af143634238f
Reviewed-on: https://chromium-review.googlesource.com/c/1357460
Commit-Queue: Martin Kreichgauer <martinkr@chromium.org>
Commit-Queue: Adam Langley <agl@chromium.org>
Reviewed-by: default avatarAdam Langley <agl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612798}
parent 95d0a57f
...@@ -164,28 +164,6 @@ void WinWebAuthnApiAuthenticator::MakeCredentialDone( ...@@ -164,28 +164,6 @@ void WinWebAuthnApiAuthenticator::MakeCredentialDone(
return; return;
} }
if (request.hmac_secret()) {
bool hmac_secret_extension_ok = false;
base::span<const WEBAUTHN_EXTENSION* const> extensions(
&credential_attestation->Extensions.pExtensions,
credential_attestation->Extensions.cExtensions);
for (const WEBAUTHN_EXTENSION* extension : extensions) {
if (extension->pwszExtensionIdentifier ==
WEBAUTHN_EXTENSIONS_IDENTIFIER_HMAC_SECRET &&
extension->cbExtension == sizeof(BOOL) &&
*(static_cast<BOOL*>(extension->pvExtension)) == TRUE) {
hmac_secret_extension_ok = true;
break;
}
}
if (!hmac_secret_extension_ok) {
DLOG(ERROR) << "missing hmacSecret extension";
std::move(callback).Run(
CtapDeviceResponseCode::kCtap2ErrUnsupportedExtension, base::nullopt);
return;
}
}
std::move(callback).Run(status, std::move(response)); std::move(callback).Run(status, std::move(response));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment