change ctap_atomic_count to increase by user-specified amount

This commit is contained in:
Conor Patrick
2019-10-08 11:35:35 -04:00
parent 8e0eda8ed4
commit bb2929b28f
3 changed files with 12 additions and 19 deletions

View File

@@ -313,20 +313,11 @@ int ctap_user_verification(uint8_t arg)
}
uint32_t ctap_atomic_count(int sel)
uint32_t ctap_atomic_count(uint32_t amount)
{
static uint32_t counter1 = 25;
/*return 713;*/
if (sel == 0)
{
printf1(TAG_RED,"counter1: %d\n", counter1);
return counter1++;
}
else
{
printf2(TAG_ERR,"counter2 not imple\n");
exit(1);
}
counter1 += amount;
return counter1;
}
int ctap_generate_rng(uint8_t * dst, size_t num)