From 69eb09580d38b7b93a96741a24662679a1237463 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 14 Feb 2022 12:15:11 +0100 Subject: [PATCH] fix(legacy): clear crypto caches on device wipe --- legacy/firmware/config.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/legacy/firmware/config.c b/legacy/firmware/config.c index 4a41232c7..726cc3d5c 100644 --- a/legacy/firmware/config.c +++ b/legacy/firmware/config.c @@ -973,4 +973,11 @@ 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); + +#if USE_BIP32_CACHE + bip32_cache_clear(); +#endif +#if USE_BIP39_CACHE + bip39_cache_clear(); +#endif }