summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-01-15 18:12:59 +0000
committerMatt Caswell <matt@openssl.org>2020-01-24 15:12:56 +0000
commit8f21260b09eca6226255763e1856c12fbc71985c (patch)
treeaa28cc741f8b5a26aeb66a3b5e52c6b6dedb66c1 /ssl/s3_lib.c
parentd80bf693faaa8ad08ca76f52228837306d77bb32 (diff)
Make sure we use RAND_bytes_ex and RAND_priv_bytes_ex in libssl
Now that libssl knows about libctx we should use it wherever we generate a random number. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/10927)
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 15aeae365e..745bccc836 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -4570,9 +4570,9 @@ int ssl_fill_hello_random(SSL *s, int server, unsigned char *result, size_t len,
unsigned char *p = result;
l2n(Time, p);
- ret = RAND_bytes(p, len - 4);
+ ret = RAND_bytes_ex(s->ctx->libctx, p, len - 4);
} else {
- ret = RAND_bytes(result, len);
+ ret = RAND_bytes_ex(s->ctx->libctx, result, len);
}
if (ret > 0) {