mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-17 20:08:12 +00:00
fix(legacy): Clear CoSi nonce when device is wiped to fix CI.
[no changelog]
This commit is contained in:
parent
7ba7eff118
commit
d96d3e705b
@ -976,6 +976,8 @@ void config_wipe(void) {
|
||||
storage_set(KEY_UUID, config_uuid, sizeof(config_uuid));
|
||||
storage_set(KEY_VERSION, &CONFIG_VERSION, sizeof(CONFIG_VERSION));
|
||||
session_clear(false);
|
||||
fsm_abortWorkflows();
|
||||
fsm_clearCosiNonce();
|
||||
|
||||
#if USE_BIP32_CACHE
|
||||
bip32_cache_clear();
|
||||
|
@ -87,6 +87,7 @@ void fsm_msgSignIdentity(const SignIdentity *msg);
|
||||
void fsm_msgGetECDHSessionKey(const GetECDHSessionKey *msg);
|
||||
void fsm_msgCosiCommit(const CosiCommit *msg);
|
||||
void fsm_msgCosiSign(const CosiSign *msg);
|
||||
void fsm_clearCosiNonce(void);
|
||||
|
||||
// debug
|
||||
#if DEBUG_LINK
|
||||
|
@ -334,6 +334,11 @@ void fsm_msgCosiSign(const CosiSign *msg) {
|
||||
} else {
|
||||
fsm_sendFailure(FailureType_Failure_FirmwareError, NULL);
|
||||
}
|
||||
memzero(cosi_nonce, sizeof(cosi_nonce));
|
||||
fsm_clearCosiNonce();
|
||||
layoutHome();
|
||||
}
|
||||
|
||||
void fsm_clearCosiNonce(void) {
|
||||
cosi_nonce_is_set = false;
|
||||
memzero(cosi_nonce, sizeof(cosi_nonce));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user