UNDO: hmac-secret should be different when UV=1

This commit is contained in:
shimun 2020-10-30 16:45:53 +01:00
parent c9894ab68a
commit 393051f407
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -461,7 +461,6 @@ static int ctap_make_extensions(CTAP_extensions * ext, uint8_t * ext_encoder_buf
// Generate credRandom
crypto_sha256_hmac_init(CRYPTO_TRANSPORT_KEY2, 0, credRandom);
crypto_sha256_update((uint8_t*)&ext->hmac_secret.credential->id, sizeof(CredentialId));
crypto_sha256_update(&getAssertionState.user_verified, 1);
crypto_sha256_hmac_final(CRYPTO_TRANSPORT_KEY2, 0, credRandom);
// Decrypt saltEnc
@ -1750,7 +1749,7 @@ uint8_t ctap_get_assertion(CborEncoder * encoder, uint8_t * request, int length)
return ret;
}
if (GA.pinAuthEmpty)
if (GA.pinAuthEmpty && GA.up)
{
ret = ctap2_user_presence_test();
check_retr(ret);