mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
storage: move unlocked statement straight after key generation
This commit is contained in:
parent
2aa49fda96
commit
49cf2423f5
@ -629,6 +629,7 @@ static void init_wiped_storage(void) {
|
||||
return;
|
||||
}
|
||||
random_buffer(cached_keys, sizeof(cached_keys));
|
||||
unlocked = sectrue;
|
||||
uint32_t version = NORCOW_VERSION;
|
||||
ensure(auth_init(), "set_storage_auth_tag failed");
|
||||
ensure(storage_set_encrypted(VERSION_KEY, &version, sizeof(version)),
|
||||
@ -642,7 +643,6 @@ static void init_wiped_storage(void) {
|
||||
ui_rem = ui_total;
|
||||
ui_message = PROCESSING_MSG;
|
||||
ensure(set_pin(PIN_EMPTY, NULL), "init_pin failed");
|
||||
unlocked = sectrue;
|
||||
}
|
||||
|
||||
void storage_init(PIN_UI_WAIT_CALLBACK callback, const uint8_t *salt,
|
||||
|
Loading…
Reference in New Issue
Block a user