mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-16 11:28:14 +00:00
increasePinFails before asking PIN
This commit is contained in:
parent
7dacfd69ee
commit
012d38a9a0
@ -156,6 +156,7 @@ bool protectPin(bool use_cached)
|
||||
delay(10000000);
|
||||
}
|
||||
}
|
||||
storage_increasePinFails();
|
||||
pin = requestPin(PinMatrixRequestType_PinMatrixRequestType_Current, "Please enter current PIN:");
|
||||
if (!pin) {
|
||||
fsm_sendFailure(FailureType_Failure_PinCancelled, "PIN Cancelled");
|
||||
@ -166,7 +167,6 @@ bool protectPin(bool use_cached)
|
||||
storage_resetPinFails();
|
||||
return true;
|
||||
} else {
|
||||
storage_increasePinFails();
|
||||
fsm_sendFailure(FailureType_Failure_PinInvalid, "Invalid PIN");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user