mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-19 12:58:13 +00:00
storage: fix unlock
This commit is contained in:
parent
5444410e04
commit
df77e74988
@ -130,6 +130,8 @@ secbool storage_unlock(const uint8_t *pin, size_t len)
|
||||
return secfalse;
|
||||
}
|
||||
|
||||
unlocked = secfalse;
|
||||
|
||||
uint32_t ofs;
|
||||
uint32_t ctr;
|
||||
if (sectrue != pin_fails_read(&ofs, &ctr)) {
|
||||
@ -153,7 +155,10 @@ secbool storage_unlock(const uint8_t *pin, size_t len)
|
||||
return secfalse;
|
||||
}
|
||||
pin_fails_reset(ofs);
|
||||
return sectrue;
|
||||
|
||||
unlocked = sectrue;
|
||||
|
||||
return unlocked;
|
||||
}
|
||||
|
||||
secbool storage_get(uint16_t key, const void **val, uint16_t *len)
|
||||
|
Loading…
Reference in New Issue
Block a user