提交 78632b66 编写于 作者: D Dr. Stephen Henson

Set randomness buffer pointer in get_entropy calls.

Reviewed-by: NKurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4092)
上级 cf37aaa3
...@@ -143,6 +143,7 @@ size_t drbg_entropy_from_system(RAND_DRBG *drbg, ...@@ -143,6 +143,7 @@ size_t drbg_entropy_from_system(RAND_DRBG *drbg,
memmove(rand_bytes.buff, &rand_bytes.buff[min_len], rand_bytes.curr); memmove(rand_bytes.buff, &rand_bytes.buff[min_len], rand_bytes.curr);
} }
CRYPTO_THREAD_unlock(rand_bytes.lock); CRYPTO_THREAD_unlock(rand_bytes.lock);
*pout = drbg->randomness;
return min_len; return min_len;
} }
...@@ -163,6 +164,7 @@ size_t drbg_entropy_from_parent(RAND_DRBG *drbg, ...@@ -163,6 +164,7 @@ size_t drbg_entropy_from_parent(RAND_DRBG *drbg,
if (st == 0) if (st == 0)
return 0; return 0;
drbg->filled = 1; drbg->filled = 1;
*pout = drbg->randomness;
return min_len; return min_len;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册