Skip to content

Commit

Permalink
fix u2f counter for real
Browse files Browse the repository at this point in the history
  • Loading branch information
conorpp committed Apr 1, 2019
1 parent 3b3f47b commit 89769ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fido2/u2f.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static int16_t u2f_authenticate(struct u2f_authenticate_request * req, uint8_t c
}

count = ctap_atomic_count(0);
hash[0] = 0x7f;
hash[0] = (count >> 24) & 0xff;
hash[1] = (count >> 16) & 0xff;
hash[2] = (count >> 8) & 0xff;
hash[3] = (count >> 0) & 0xff;
Expand All @@ -264,7 +264,7 @@ static int16_t u2f_authenticate(struct u2f_authenticate_request * req, uint8_t c
crypto_ecc256_sign(hash, 32, sig);

u2f_response_writeback(&up,1);
hash[0] = 0x7f;
hash[0] = (count >> 24) & 0xff;
hash[1] = (count >> 16) & 0xff;
hash[2] = (count >> 8) & 0xff;
hash[3] = (count >> 0) & 0xff;
Expand Down

0 comments on commit 89769ec

Please sign in to comment.