提交 bc5145e3 编写于 作者: R Rich Salz

Instantiate when RAND_status() checks

Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4150)
上级 bdcacd93
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册