summaryrefslogtreecommitdiff
path: root/board/cr50/fips_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/fips_rand.c')
-rw-r--r--board/cr50/fips_rand.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/cr50/fips_rand.c b/board/cr50/fips_rand.c
index 2b2f796767..a214f9196e 100644
--- a/board/cr50/fips_rand.c
+++ b/board/cr50/fips_rand.c
@@ -181,9 +181,11 @@ static struct rand_result read_rand(void)
uint32_t empty_count = 0;
uint32_t reset_count = 0;
+#ifdef CRYPTO_TEST_SETUP
/* Do we need to simulate error? */
if (fips_break_cmd == FIPS_BREAK_TRNG)
return (struct rand_result){ .random_value = 0, .valid = true };
+#endif
/**
* make sure we never hang in the loop - try at max 1