aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-08-05 11:19:27 +0100
committerDr. Stephen Henson <steve@openssl.org>2017-08-05 11:19:27 +0100
commit78632b6633cf8af21a4fba2091f3e771e3ab40fb (patch)
treea524ceab703476de32c6cbbecd4a57afc6428166 /crypto
parentcf37aaa335965902c6a022bc3c3e0162f59c0f3a (diff)
downloadopenssl-78632b6633cf8af21a4fba2091f3e771e3ab40fb.tar.gz
Set randomness buffer pointer in get_entropy calls.
Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/4092)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/rand/rand_lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c
index d6cb717489..79b2cce249 100644
--- a/crypto/rand/rand_lib.c
+++ b/crypto/rand/rand_lib.c
@@ -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);
}
CRYPTO_THREAD_unlock(rand_bytes.lock);
+ *pout = drbg->randomness;
return min_len;
}
@@ -163,6 +164,7 @@ size_t drbg_entropy_from_parent(RAND_DRBG *drbg,
if (st == 0)
return 0;
drbg->filled = 1;
+ *pout = drbg->randomness;
return min_len;
}