fix(nfc): recognise FIDO_2_1, FIDO_2_1_PRE, FIDO_2_2 in select_fido2#197
Merged
Conversation
Stricter CTAP 2.1+ NFC authenticators advertise their version string as "FIDO_2_1", "FIDO_2_1_PRE", or "FIDO_2_2" from the FIDO AID SELECT response without shadowing as "U2F_V2". The current code only matches "FIDO_2_0" and "U2F_V2", so those devices are reported as supporting neither protocol and are unusable. Factor the version-string check into a helper and match all spec-defined strings. Keep the U2F_V2 fallback that probes ctap2_get_info.
a282788 to
cf17d75
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stricter CTAP 2.1+ NFC authenticators advertise the version string
FIDO_2_1,FIDO_2_1_PRE, orFIDO_2_2from the FIDO AID SELECT response without shadowing asU2F_V2. The current code only matchesFIDO_2_0andU2F_V2, so those devices are reported as supporting neither protocol.Changes
select_fido2.Other NFC items (CTAP2 keepalive, SELECT Le, SW preservation) are tracked separately in #195.
Refs: CTAP 2.2 section 11.3.1.