mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-18 10:32:02 +00:00
Add storage_is_unlocked().
This commit is contained in:
parent
ebe884ab4d
commit
840f7461ee
@ -641,6 +641,11 @@ static secbool pin_get_fails(uint32_t *ctr)
|
|||||||
return sectrue;
|
return sectrue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
secbool storage_is_unlocked(void)
|
||||||
|
{
|
||||||
|
return unlocked;
|
||||||
|
}
|
||||||
|
|
||||||
void storage_lock(void)
|
void storage_lock(void)
|
||||||
{
|
{
|
||||||
unlocked = secfalse;
|
unlocked = secfalse;
|
||||||
|
@ -28,6 +28,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_init(PIN_UI_WAIT_CALLBACK callback, const uint8_t *salt, const uint16_t salt_len);
|
||||||
void storage_wipe(void);
|
void storage_wipe(void);
|
||||||
|
secbool storage_is_unlocked(void);
|
||||||
void storage_lock(void);
|
void storage_lock(void);
|
||||||
secbool storage_unlock(const uint32_t pin);
|
secbool storage_unlock(const uint32_t pin);
|
||||||
secbool storage_has_pin(void);
|
secbool storage_has_pin(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user