summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-08-06 14:05:21 +0100
committerDr. Stephen Henson <steve@openssl.org>2017-08-06 14:05:21 +0100
commit69a978d35984bb27af336cffc252bdde51d36adb (patch)
tree51382dc40227d5fac89f1163c273210b9a9b1137
parentafc901e0ec53cd98618ade030b67a1ff8337d9dd (diff)
Use passed drbg, not global one
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4097)
-rw-r--r--crypto/rand/rand_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index 79b2cce249..e76ca2702d 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -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)