mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-17 03:48:09 +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);
|
delay(10000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
storage_increasePinFails();
|
||||||
pin = requestPin(PinMatrixRequestType_PinMatrixRequestType_Current, "Please enter current PIN:");
|
pin = requestPin(PinMatrixRequestType_PinMatrixRequestType_Current, "Please enter current PIN:");
|
||||||
if (!pin) {
|
if (!pin) {
|
||||||
fsm_sendFailure(FailureType_Failure_PinCancelled, "PIN Cancelled");
|
fsm_sendFailure(FailureType_Failure_PinCancelled, "PIN Cancelled");
|
||||||
@ -166,7 +167,6 @@ bool protectPin(bool use_cached)
|
|||||||
storage_resetPinFails();
|
storage_resetPinFails();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
storage_increasePinFails();
|
|
||||||
fsm_sendFailure(FailureType_Failure_PinInvalid, "Invalid PIN");
|
fsm_sendFailure(FailureType_Failure_PinInvalid, "Invalid PIN");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user