mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-04-25 19:49:02 +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;
|
return;
|
||||||
}
|
}
|
||||||
random_buffer(cached_keys, sizeof(cached_keys));
|
random_buffer(cached_keys, sizeof(cached_keys));
|
||||||
|
unlocked = sectrue;
|
||||||
uint32_t version = NORCOW_VERSION;
|
uint32_t version = NORCOW_VERSION;
|
||||||
ensure(auth_init(), "set_storage_auth_tag failed");
|
ensure(auth_init(), "set_storage_auth_tag failed");
|
||||||
ensure(storage_set_encrypted(VERSION_KEY, &version, sizeof(version)),
|
ensure(storage_set_encrypted(VERSION_KEY, &version, sizeof(version)),
|
||||||
@ -642,7 +643,6 @@ static void init_wiped_storage(void) {
|
|||||||
ui_rem = ui_total;
|
ui_rem = ui_total;
|
||||||
ui_message = PROCESSING_MSG;
|
ui_message = PROCESSING_MSG;
|
||||||
ensure(set_pin(PIN_EMPTY, NULL), "init_pin failed");
|
ensure(set_pin(PIN_EMPTY, NULL), "init_pin failed");
|
||||||
unlocked = sectrue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void storage_init(PIN_UI_WAIT_CALLBACK callback, const uint8_t *salt,
|
void storage_init(PIN_UI_WAIT_CALLBACK callback, const uint8_t *salt,
|
||||||
|
Loading…
Reference in New Issue
Block a user