1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 19:38:09 +00:00

Unlock for testing.

This commit is contained in:
andrew 2019-01-31 18:31:10 +01:00 committed by Pavol Rusnak
parent b8932205ce
commit 681137c2ef
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

View File

@ -342,6 +342,8 @@ void config_init(void)
// TODO Add salt.
storage_init(&protectPinUiCallback, (const uint8_t*)"", 0);
storage_unlock(1);
uint16_t len = 0;
if (sectrue == storage_get(KEY_UUID, config_uuid, sizeof(config_uuid), &len) && len == sizeof(config_uuid)) {
data2hex(config_uuid, sizeof(config_uuid), config_uuid_str);
@ -432,9 +434,6 @@ void config_dumpNode(HDNodeType *node)
void config_loadDevice(const LoadDevice *msg)
{
session_clear(true);
// TODO We can't set anything with the storage locked. Shouldn't we wipe?
config_set_bool(KEY_IMPORTED, true);
config_setPassphraseProtection(msg->has_passphrase_protection && msg->passphrase_protection);
@ -459,6 +458,8 @@ void config_loadDevice(const LoadDevice *msg)
if (msg->has_u2f_counter) {
config_setU2FCounter(msg->u2f_counter);
}
session_clear(true);
}
void config_setLabel(const char *label)