mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-09 08:08:09 +00:00
Use error_shutdown() to display 'Too many wrong PIN attempts. Storage has been wiped.'
This commit is contained in:
parent
2862d679ac
commit
4429888b93
@ -730,7 +730,7 @@ secbool storage_unlock(uint32_t pin)
|
|||||||
wait_random();
|
wait_random();
|
||||||
if (ctr >= PIN_MAX_TRIES) {
|
if (ctr >= PIN_MAX_TRIES) {
|
||||||
storage_wipe();
|
storage_wipe();
|
||||||
ensure(secfalse, "pin_fails_check_max");
|
error_shutdown("Too many wrong PIN", "attempts. Storage has", "been wiped.", NULL);
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -779,7 +779,7 @@ secbool storage_unlock(uint32_t pin)
|
|||||||
wait_random();
|
wait_random();
|
||||||
if (ctr + 1 >= PIN_MAX_TRIES) {
|
if (ctr + 1 >= PIN_MAX_TRIES) {
|
||||||
storage_wipe();
|
storage_wipe();
|
||||||
ensure(secfalse, "pin_fails_check_max");
|
error_shutdown("Too many wrong PIN", "attempts. Storage has", "been wiped.", NULL);
|
||||||
}
|
}
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user