force HAVE_HASHDRBG enabled in settings.h unless WOLFSSL_FORCE_RC4_DRBG flag set

This commit is contained in:
John Safranek
2015-06-24 11:16:18 -06:00
parent d334b05596
commit 5ba35b1f64
2 changed files with 9 additions and 0 deletions

View File

@@ -35,6 +35,9 @@
#endif #endif
#ifndef HAVE_FIPS /* avoid redefining structs and macros */ #ifndef HAVE_FIPS /* avoid redefining structs and macros */
#if defined(WOLFSSL_FORCE_RC4_DRBG) && defined(NO_RC4)
#error Cannot have WOLFSSL_FORCE_RC4_DRBG and NO_RC4 defined.
#endif /* WOLFSSL_FORCE_RC4_DRBG && NO_RC4 */
#if defined(HAVE_HASHDRBG) || defined(NO_RC4) #if defined(HAVE_HASHDRBG) || defined(NO_RC4)
#ifdef NO_SHA256 #ifdef NO_SHA256
#error "Hash DRBG requires SHA-256." #error "Hash DRBG requires SHA-256."

View File

@@ -790,6 +790,12 @@
#define NO_OLD_TLS #define NO_OLD_TLS
#endif #endif
/* If not forcing to use ARC4 as the DRBG, always enable Hash_DRBG */
#undef HAVE_HASHDRBG
#ifndef WOLFSSL_FORCE_RC4_DRBG
#define HAVE_HASHDRBG
#endif
/* Place any other flags or defines here */ /* Place any other flags or defines here */