mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Fix undeclared deps on CTR_DRBG in programs/fuzz
While at it, fix a few other obvious ones such as ENTROPY and TIMING_C when applicable. A non-regression test for CTR_DRBG will be added in a follow-up commit. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
@ -58,8 +58,13 @@ int dummy_random( void *p_rng, unsigned char *output, size_t output_len )
|
||||
int ret;
|
||||
size_t i;
|
||||
|
||||
#if defined(MBEDTLS_CTR_DRBG_C)
|
||||
//use mbedtls_ctr_drbg_random to find bugs in it
|
||||
ret = mbedtls_ctr_drbg_random(p_rng, output, output_len);
|
||||
#else
|
||||
(void) p_rng;
|
||||
ret = 0;
|
||||
#endif
|
||||
for (i=0; i<output_len; i++) {
|
||||
//replace result with pseudo random
|
||||
output[i] = (unsigned char) rand();
|
||||
|
Reference in New Issue
Block a user