aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-11 13:54:16 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-11 13:54:16 +0100
commit942c952db6d81c4ea52ea40daf8470a0d3e3e420 (patch)
treec18cf69f2200e0791b3ae6233345c0c1a52e3381 /lib/vtls
parentf9de7c405f2fcaca620155cb72f197ce2aba8462 (diff)
openssl: avoid unnecessary seeding if already done
1.1.0+ does more of this by itself so we can avoid extra processing this way.
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 9cf36b358..fa128fa46 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -188,8 +188,8 @@ static int ossl_seed(struct Curl_easy *data)
char *buf = data->state.buffer; /* point to the big buffer */
int nread=0;
- /* Q: should we add support for a random file name as a libcurl option?
- A: Yes, it is here */
+ if(rand_enough())
+ return 1;
#ifndef RANDOM_FILE
/* if RANDOM_FILE isn't defined, we only perform this if an option tells