1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 03:18:09 +00:00

Use error_shutdown() to display 'Too many wrong PIN attempts. Storage has been wiped.'

This commit is contained in:
andrew 2019-02-06 17:42:10 +01:00
parent 2862d679ac
commit 4429888b93

View File

@ -730,7 +730,7 @@ secbool storage_unlock(uint32_t pin)
wait_random();
if (ctr >= PIN_MAX_TRIES) {
storage_wipe();
ensure(secfalse, "pin_fails_check_max");
error_shutdown("Too many wrong PIN", "attempts. Storage has", "been wiped.", NULL);
return secfalse;
}
@ -779,7 +779,7 @@ secbool storage_unlock(uint32_t pin)
wait_random();
if (ctr + 1 >= PIN_MAX_TRIES) {
storage_wipe();
ensure(secfalse, "pin_fails_check_max");
error_shutdown("Too many wrong PIN", "attempts. Storage has", "been wiped.", NULL);
}
return secfalse;
}