diff options
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/drbg_lib.c | 5 | ||||
-rw-r--r-- | crypto/rand/rand_local.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c index 52e6743..2c9ed3f 100644 --- a/crypto/rand/drbg_lib.c +++ b/crypto/rand/drbg_lib.c @@ -503,7 +503,9 @@ void RAND_DRBG_free(RAND_DRBG *drbg) drbg->meth->uninstantiate(drbg); rand_pool_free(drbg->adin_pool); CRYPTO_THREAD_lock_free(drbg->lock); +#ifndef FIPS_MODE CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RAND_DRBG, drbg, &drbg->ex_data); +#endif if (drbg->secure) OPENSSL_secure_clear_free(drbg, sizeof(*drbg)); @@ -1098,6 +1100,7 @@ int rand_drbg_enable_locking(RAND_DRBG *drbg) return 1; } +#ifndef FIPS_MODE /* * Get and set the EXDATA */ @@ -1110,7 +1113,7 @@ void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx) { return CRYPTO_get_ex_data(&drbg->ex_data, idx); } - +#endif /* * The following functions provide a RAND_METHOD that works on the diff --git a/crypto/rand/rand_local.h b/crypto/rand/rand_local.h index 7817df8..310f03f 100644 --- a/crypto/rand/rand_local.h +++ b/crypto/rand/rand_local.h @@ -308,8 +308,10 @@ struct rand_drbg_st { size_t seedlen; DRBG_STATUS state; +#ifndef FIPS_MODE /* Application data, mainly used in the KATs. */ CRYPTO_EX_DATA ex_data; +#endif /* Implementation specific data */ union { |