Commit 935eba85 authored by Nina Satragno's avatar Nina Satragno Committed by Commit Bot

Fix large blob key extension ID

https://github.com/fido-alliance/fido-2-specs/pull/1036 fixed the member
ID for large blob key on GetAssertion. The spec used to quote both 0x0b
and 0x07, and I originally implemented the one that didn't get chosen.

This feature is guarded behind the WebAuthenticationLargeBlobExtension
feature flag.

https://w3c.github.io/webauthn/#sctn-large-blob-extension

Bug: 1114875
Change-Id: I7ae04dbb35b5df586271737858071b6ee5601cd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468639
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Auto-Submit: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#816782}
parent 4ab5cbb8
...@@ -190,7 +190,7 @@ base::Optional<AuthenticatorGetAssertionResponse> ReadCTAPGetAssertionResponse( ...@@ -190,7 +190,7 @@ base::Optional<AuthenticatorGetAssertionResponse> ReadCTAPGetAssertionResponse(
} }
} }
it = response_map.find(CBOR(0x0B)); it = response_map.find(CBOR(7));
if (it != response_map.end()) { if (it != response_map.end()) {
if (!it->second.is_bytestring() || if (!it->second.is_bytestring() ||
it->second.GetBytestring().size() != kLargeBlobKeyLength) { it->second.GetBytestring().size() != kLargeBlobKeyLength) {
......
...@@ -438,7 +438,7 @@ std::vector<uint8_t> EncodeGetAssertionResponse( ...@@ -438,7 +438,7 @@ std::vector<uint8_t> EncodeGetAssertionResponse(
cbor::Value(*response.android_client_data_ext())); cbor::Value(*response.android_client_data_ext()));
} }
if (response.large_blob_key()) { if (response.large_blob_key()) {
response_map.emplace(0x0b, cbor::Value(*response.large_blob_key())); response_map.emplace(0x07, cbor::Value(*response.large_blob_key()));
} }
return WriteCBOR(cbor::Value(std::move(response_map)), allow_invalid_utf8); return WriteCBOR(cbor::Value(std::move(response_map)), allow_invalid_utf8);
......
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