mirror of
https://github.com/openssl/openssl.git
synced 2025-01-10 12:03:34 +08:00
Instantiate when RAND_status() checks
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4150)
This commit is contained in:
parent
bdcacd93b1
commit
bc5145e372
@ -403,6 +403,8 @@ static int drbg_status(void)
|
||||
int ret;
|
||||
|
||||
CRYPTO_THREAD_write_lock(rand_drbg.lock);
|
||||
if (rand_drbg.state == DRBG_UNINITIALISED)
|
||||
RAND_DRBG_instantiate(&rand_drbg, NULL, 0);
|
||||
ret = rand_drbg.state == DRBG_READY ? 1 : 0;
|
||||
CRYPTO_THREAD_unlock(rand_drbg.lock);
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user