diff options
Diffstat (limited to 'chip/host/trng.c')
-rw-r--r-- | chip/host/trng.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chip/host/trng.c b/chip/host/trng.c index d90415df71..ccb7a68983 100644 --- a/chip/host/trng.c +++ b/chip/host/trng.c @@ -14,6 +14,7 @@ #error "This fake trng driver must not be used in non-test builds." #endif +#include <stdbool.h> #include <stdint.h> #include <stdlib.h> /* Only valid for host */ @@ -38,3 +39,9 @@ test_mockable void rand_bytes(void *buffer, size_t len) for (b = buffer, end = b+len; b != end; b++) *b = (uint8_t)rand_r(&seed); } + +test_mockable bool fips_rand_bytes(void *buffer, size_t len) +{ + rand_bytes(buffer, len); + return true; +} |