1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 14:28:07 +00:00

config: Avoid unlocking storage after wipe.

This commit is contained in:
Andrew Kozlik 2019-02-23 03:20:34 +01:00 committed by Pavol Rusnak
parent b62ab43b95
commit f05664fdf3
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -908,7 +908,9 @@ void config_setAutoLockDelayMs(uint32_t auto_lock_delay_ms)
void config_wipe(void)
{
storage_wipe();
storage_unlock(PIN_EMPTY);
if (storage_is_unlocked() != sectrue) {
storage_unlock(PIN_EMPTY);
}
random_buffer((uint8_t *)config_uuid, sizeof(config_uuid));
data2hex(config_uuid, sizeof(config_uuid), config_uuid_str);
autoLockDelayMsCached = secfalse;