From a4d502e22aa571ff7de7acc1e7b569294858a44c Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 13 Sep 2018 14:07:08 -0700 Subject: [PATCH] Additional fixes for no RNG cases. Specifically `./configure --disable-hashdrbg --disable-rng --enable-cryptonly` --- wolfssl/wolfcrypt/random.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wolfssl/wolfcrypt/random.h b/wolfssl/wolfcrypt/random.h index 676cd66a1..9290be631 100644 --- a/wolfssl/wolfcrypt/random.h +++ b/wolfssl/wolfcrypt/random.h @@ -66,8 +66,8 @@ #endif /* make sure Hash DRBG is enabled, unless WC_NO_HASHDRBG is defined - or CUSTOM_RAND_GENERATE_BLOCK is defined*/ -#if !defined(WC_NO_HASHDRBG) || !defined(CUSTOM_RAND_GENERATE_BLOCK) + or CUSTOM_RAND_GENERATE_BLOCK is defined */ +#if !defined(WC_NO_HASHDRBG) && !defined(CUSTOM_RAND_GENERATE_BLOCK) #undef HAVE_HASHDRBG #define HAVE_HASHDRBG #ifndef WC_RESEED_INTERVAL @@ -106,7 +106,7 @@ #include #elif defined(HAVE_WNR) /* allow whitewood as direct RNG source using wc_GenerateSeed directly */ -#else +#elif !defined(WC_NO_RNG) #error No RNG source defined! #endif