From: Daniel Stenberg Date: Fri, 11 Nov 2016 12:54:16 +0000 (+0100) Subject: openssl: avoid unnecessary seeding if already done X-Git-Tag: curl-7_52_0~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=942c952db6d81c4ea52ea40daf8470a0d3e3e420;p=thirdparty%2Fcurl.git openssl: avoid unnecessary seeding if already done 1.1.0+ does more of this by itself so we can avoid extra processing this way. --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 9cf36b3581..fa128fa46a 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