mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
Add storage_lock().
This commit is contained in:
parent
d49e3c9f3c
commit
7228b299b3
@ -641,6 +641,13 @@ static secbool pin_get_fails(uint32_t *ctr)
|
||||
return sectrue;
|
||||
}
|
||||
|
||||
void storage_lock(void)
|
||||
{
|
||||
unlocked = secfalse;
|
||||
memzero(cached_keys, sizeof(cached_keys));
|
||||
memzero(authentication_sum, sizeof(authentication_sum));
|
||||
}
|
||||
|
||||
static secbool unlock(uint32_t pin)
|
||||
{
|
||||
const void *buffer = NULL;
|
||||
|
@ -29,6 +29,7 @@ typedef void (*PIN_UI_WAIT_CALLBACK)(uint32_t wait, uint32_t progress);
|
||||
void storage_init(PIN_UI_WAIT_CALLBACK callback, const uint8_t *salt, const uint16_t salt_len);
|
||||
void storage_wipe(void);
|
||||
void storage_wipe_ex(uint32_t new_pin, uint32_t pin_fail_count);
|
||||
void storage_lock(void);
|
||||
secbool storage_unlock(const uint32_t pin);
|
||||
secbool storage_has_pin(void);
|
||||
uint32_t storage_get_pin_rem(void);
|
||||
|
Loading…
Reference in New Issue
Block a user