From bdb37d0da9f58a8c26fc2bfbfc538b802a08f925 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 7 Jan 2015 14:45:11 -0700 Subject: [PATCH] adjustment to compatibility in random.h file --- cyassl/ctaocrypt/random.h | 11 ++++++++++- cyassl/ctaocrypt/settings_comp.h | 11 ----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/cyassl/ctaocrypt/random.h b/cyassl/ctaocrypt/random.h index cb3e953a2..11634fc61 100644 --- a/cyassl/ctaocrypt/random.h +++ b/cyassl/ctaocrypt/random.h @@ -23,7 +23,16 @@ #ifndef CTAO_CRYPT_RANDOM_H #define CTAO_CRYPT_RANDOM_H -#include + /* for random.h compatibility */ + #include + #define InitRng wc_InitRng + #define RNG_GenerateBlock wc_RNG_GenerateBlock + #define RNG_GenerateByte wc_RNG_GenerateByte + + #if defined(HAVE_HASHDRBG) || defined(NO_RC4) + #define FreeRng wc_FreeRng + #define RNG_HealthTest wc_RNG_HealthTest + #endif /* HAVE_HASHDRBG || NO_RC4 */ #endif /* CTAO_CRYPT_RANDOM_H */ diff --git a/cyassl/ctaocrypt/settings_comp.h b/cyassl/ctaocrypt/settings_comp.h index bd96da2a2..770befe00 100644 --- a/cyassl/ctaocrypt/settings_comp.h +++ b/cyassl/ctaocrypt/settings_comp.h @@ -46,17 +46,6 @@ * using old function calls */ #ifndef HAVE_FIPS - /* for random.h compatibility */ - #include - #define InitRng wc_InitRng - #define RNG_GenerateBlock wc_RNG_GenerateBlock - #define RNG_GenerateByte wc_RNG_GenerateByte - - #if defined(HAVE_HASHDRBG) || defined(NO_RC4) - #define FreeRng wc_FreeRng - #define RNG_HealthTest wc_RNG_HealthTest - #endif /* HAVE_HASHDRBG || NO_RC4 */ - #ifndef NO_AES #include #define AesSetKey wc_AesSetKey