forked from LedgerHQ/ledger-u2f-javacard
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iOS/Safari now offers native support for FIDO2 authenticators. However, while all existing U2F authenticators are also FIDO2 CTAP1 authenticators, this applet doesn't seem to be compatible with this new iOS feature. This commit remedies this by adding a lightweight work-around that coerces recent versions of iOS to use CTAP1 to both register and authenticate with this applet via NFC. The work-around is to implement support for the FIDO2 `NFCCTAP_MSG` command and have it always return the error `CTAP1_ERR_INVALID_COMMAND`. This is apparently enough to coerce iOS to use CTAP1 with the authenticator instead of CTAP2. This work-around should remain viable since the FIDO2 CTAP spec states that the platform should attempt to use CTAP1 when the authenticator returns a command error or improperly formated CBOR in response to the get info command. Apparently iOS isn't considering APDU errors to be "command errors", but CTAP errors apparently are interpreted as such.
- Loading branch information
1 parent
7a7dcc7
commit 8b58c4c
Showing
1 changed file
with
48 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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