提交 69a978d3 编写于 作者: D Dr. Stephen Henson

Use passed drbg, not global one

Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4097)
上级 afc901e0
......@@ -117,7 +117,7 @@ size_t drbg_entropy_from_system(RAND_DRBG *drbg,
min_len = drbg->size;
}
if (rand_drbg.filled) {
if (drbg->filled) {
/* Re-use what we have. */
*pout = drbg->randomness;
return drbg->size;
......@@ -136,7 +136,7 @@ size_t drbg_entropy_from_system(RAND_DRBG *drbg,
min_len = rand_bytes.curr;
if (min_len != 0) {
memcpy(drbg->randomness, rand_bytes.buff, min_len);
rand_drbg.filled = 1;
drbg->filled = 1;
/* Update amount left and shift it down. */
rand_bytes.curr -= min_len;
if (rand_bytes.curr != 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册