1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

Add storage_is_unlocked().

This commit is contained in:
andrew 2019-01-30 17:36:02 +01:00
parent ebe884ab4d
commit 840f7461ee
2 changed files with 6 additions and 0 deletions

View File

@ -641,6 +641,11 @@ static secbool pin_get_fails(uint32_t *ctr)
return sectrue;
}
secbool storage_is_unlocked(void)
{
return unlocked;
}
void storage_lock(void)
{
unlocked = secfalse;

View File

@ -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_wipe(void);
secbool storage_is_unlocked(void);
void storage_lock(void);
secbool storage_unlock(const uint32_t pin);
secbool storage_has_pin(void);