mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
Use passed drbg, not global one
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4097)
This commit is contained in:
parent
afc901e0ec
commit
69a978d359
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user