allocate cids better and do proper timeouts in hid

This commit is contained in:
Conor Patrick
2018-05-28 14:14:59 -04:00
parent 87429fb8a6
commit 9c42823cd2
10 changed files with 342 additions and 148 deletions

6
ctap.c
View File

@@ -1260,11 +1260,17 @@ void ctap_reset_pin_attempts()
_flash_tries = 8;
}
void ctap_reset_state()
{
memset(&getAssertionState, 0, sizeof(getAssertionState));
}
void ctap_reset()
{
_flash_tries = 8;
PIN_CODE_SET = 0;
DEVICE_LOCKOUT = 0;
ctap_reset_state();
memset(PIN_CODE,0,sizeof(PIN_CODE));
memset(PIN_CODE_HASH,0,sizeof(PIN_CODE_HASH));
crypto_ecc256_make_key_pair(KEY_AGREEMENT_PUB, KEY_AGREEMENT_PRIV);