Skip to content

Commit

Permalink
fix credential ordering issue
Browse files Browse the repository at this point in the history
  • Loading branch information
conorpp committed Oct 12, 2021
1 parent dd3f0c8 commit d910d1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fido2/ctap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,10 @@ int ctap_filter_invalid_credentials(CTAP_getAssertion * GA)
count++;
// add user info if it exists
if ( add_existing_user_info(&GA->creds[i]) ) {
printf1(TAG_GREEN,"USER ID SIZE: %d\r\n", GA->creds[i].credential.user.id_size);
// If RK matches credential in the allow_list, we should
// only return one credential.
GA->credLen = i+1;
break;
}
}
Expand Down Expand Up @@ -1863,6 +1865,7 @@ uint8_t ctap_get_assertion(CborEncoder * encoder, uint8_t * request, int length)
map_size += 1;
}

printf1(TAG_GREEN,"2 USER ID SIZE: %d\r\n", GA.creds[0].credential.user.id_size);

if (GA.creds[validCredCount - 1].credential.user.id_size)
{
Expand Down

0 comments on commit d910d1a

Please sign in to comment.