Skip to content

Commit

Permalink
U2F key_lookup: do not fail upon SW_WRONG_LENGTH (0x6700)
Browse files Browse the repository at this point in the history
  • Loading branch information
James-ZHANG committed Sep 13, 2024
1 parent a0a3741 commit 9cefafe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/fido/param.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@

/* ISO7816-4 status words. */
#define SW1_MORE_DATA 0x61
#define SW_WRONG_LENGTH 0x6700
#define SW_CONDITIONS_NOT_SATISFIED 0x6985
#define SW_WRONG_DATA 0x6a80
#define SW_NO_ERROR 0x9000
Expand Down
1 change: 1 addition & 0 deletions src/u2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ key_lookup(fido_dev_t *dev, const char *rp_id, const fido_blob_t *key_id,
*found = 1; /* key exists */
break;
case SW_WRONG_DATA:
case SW_WRONG_LENGTH:
*found = 0; /* key does not exist */
break;
default:
Expand Down

0 comments on commit 9cefafe

Please sign in to comment.