Add -Wall -Werror and catch sigint (pc only)

This commit is contained in:
Emanuele Cesena
2018-10-24 21:09:04 -07:00
parent fb93891685
commit f9757c0a08
5 changed files with 22 additions and 7 deletions

View File

@@ -1290,7 +1290,7 @@ void ctap_init()
{
printf1(TAG_STOR,"pin code: \"%s\"\n", STATE.pin_code);
crypto_sha256_init();
crypto_sha256_update(STATE.pin_code, strnlen(STATE.pin_code, NEW_PIN_ENC_MAX_SIZE));
crypto_sha256_update(STATE.pin_code, strnlen((char *)STATE.pin_code, NEW_PIN_ENC_MAX_SIZE));
crypto_sha256_final(PIN_CODE_HASH);
printf1(TAG_STOR, "attempts_left: %d\n", STATE.remaining_tries);
}