summaryrefslogtreecommitdiffstats
path: root/crypto/rand/drbg_rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rand/drbg_rand.c')
-rw-r--r--crypto/rand/drbg_rand.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/rand/drbg_rand.c b/crypto/rand/drbg_rand.c
index 77d59ec813..8b30cd8a0d 100644
--- a/crypto/rand/drbg_rand.c
+++ b/crypto/rand/drbg_rand.c
@@ -29,8 +29,12 @@ static CRYPTO_ONCE ossl_drbg_init = CRYPTO_ONCE_STATIC_INIT;
DEFINE_RUN_ONCE_STATIC(do_ossl_drbg_init)
{
+ int st = 1;
+
ossl_drbg.lock = CRYPTO_THREAD_lock_new();
- return ossl_drbg.lock != NULL;
+ st &= ossl_drbg.lock != NULL;
+ st &= RAND_DRBG_set(&ossl_drbg, NID_aes_128_ctr, 0) == 1;
+ return st;
}
void rand_drbg_cleanup(void)