提交 58351fbd 编写于 作者: D Dr. Matthias St. Pierre

drbg_bytes: remove check for DRBG_UNINITIALIZED state

This check not only prevented the automatic reinstantiation of the
DRBG, which is implemented in RAND_DRBG_generate(), but also prevented
an error message from being generated in the case of failure.
Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/5251)
上级 1c4b1545
......@@ -772,9 +772,6 @@ static int drbg_bytes(unsigned char *out, int count)
return 0;
CRYPTO_THREAD_write_lock(drbg->lock);
if (drbg->state == DRBG_UNINITIALISED)
goto err;
for ( ; count > 0; count -= chunk, out += chunk) {
chunk = count;
if (chunk > drbg->max_request)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册