Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user presence test when pinAuth is empty #398

Merged
merged 1 commit into from
Mar 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions fido2/ctap.c
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,8 @@ uint8_t ctap_make_credential(CborEncoder * encoder, uint8_t * request, int lengt
}
if (MC.pinAuthEmpty)
{
check_retr( ctap2_user_presence_test(CTAP2_UP_DELAY_MS) );
ret = ctap2_user_presence_test(CTAP2_UP_DELAY_MS);
check_retr(ret);
return ctap_is_pin_set() == 1 ? CTAP2_ERR_PIN_AUTH_INVALID : CTAP2_ERR_PIN_NOT_SET;
}
if ((MC.paramsParsed & MC_requiredMask) != MC_requiredMask)
Expand Down Expand Up @@ -1169,7 +1170,8 @@ uint8_t ctap_get_assertion(CborEncoder * encoder, uint8_t * request, int length)

if (GA.pinAuthEmpty)
{
check_retr( ctap2_user_presence_test(CTAP2_UP_DELAY_MS) );
ret = ctap2_user_presence_test(CTAP2_UP_DELAY_MS);
check_retr(ret);
return ctap_is_pin_set() == 1 ? CTAP2_ERR_PIN_AUTH_INVALID : CTAP2_ERR_PIN_NOT_SET;
}
if (GA.pinAuthPresent)
Expand Down