mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-02 19:01:04 +00:00
fixup! storage: Implement storage_change_wipe_code().
This commit is contained in:
parent
579244b068
commit
de96e675e5
@ -958,6 +958,7 @@ static secbool unlock(uint32_t pin, const uint8_t *ext_salt) {
|
|||||||
// Get the pin failure counter
|
// Get the pin failure counter
|
||||||
uint32_t ctr = 0;
|
uint32_t ctr = 0;
|
||||||
if (sectrue != pin_get_fails(&ctr)) {
|
if (sectrue != pin_get_fails(&ctr)) {
|
||||||
|
memzero(&pin, sizeof(pin));
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -997,6 +998,7 @@ static secbool unlock(uint32_t pin, const uint8_t *ext_salt) {
|
|||||||
if (sectrue != initialized ||
|
if (sectrue != initialized ||
|
||||||
sectrue != norcow_get(EDEK_PVC_KEY, &rand_salt, &len) ||
|
sectrue != norcow_get(EDEK_PVC_KEY, &rand_salt, &len) ||
|
||||||
len != RANDOM_SALT_SIZE + KEYS_SIZE + PVC_SIZE) {
|
len != RANDOM_SALT_SIZE + KEYS_SIZE + PVC_SIZE) {
|
||||||
|
memzero(&pin, sizeof(pin));
|
||||||
handle_fault("no EDEK");
|
handle_fault("no EDEK");
|
||||||
return secfalse;
|
return secfalse;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user