mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-07 14:00:57 +00:00
fixup! feat(core): introduce storage insecure mode
This commit is contained in:
parent
eca810e159
commit
745893f9e0
@ -87,7 +87,6 @@ const uint32_t V0_PIN_EMPTY = 1;
|
||||
#define MAX_WIPE_CODE_LEN 50
|
||||
|
||||
#if STORAGE_INSECURE_TESTING_MODE && !PRODUCTION
|
||||
#pragma message("STORAGE IS INSECURE DO NOT USE THIS IN PRODUCTION")
|
||||
#define PIN_ITER_COUNT 1
|
||||
#else
|
||||
// The total number of iterations to use in PBKDF2.
|
||||
|
@ -2,3 +2,15 @@
|
||||
#include <stdint.h>
|
||||
|
||||
uint32_t hamming_weight(uint32_t value);
|
||||
|
||||
#ifndef STORAGE_INSECURE_TESTING_MODE
|
||||
#define STORAGE_INSECURE_TESTING_MODE 0
|
||||
#endif
|
||||
|
||||
#if STORAGE_INSECURE_TESTING_MODE
|
||||
#if PRODUCTION
|
||||
#error "STORAGE_INSECURE_TESTING_MODE can't be used in production"
|
||||
#else
|
||||
#pragma message("STORAGE IS INSECURE DO NOT USE THIS IN PRODUCTION")
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user