[PATCH] Curl_rand: fixed and moved to rand.c
Date: Fri, 11 Nov 2016 23:43:36 +0100 (CET)
I mean to land this patch (see attachment).
As I've recently cleaned up some of the OpenSSL code to make sure it exists
out with an error if it can't seend the PRNG properly I follow up with some
further changes in that direction.
Now Curl_rand() is made to fail if it cannot get the necessary random level.
Also as a consequence of the fix, when built with a "proper" TLS backend,
the code will never fall back to a pseudo random function
I changed the proto of Curl_rand() slightly to provide a number of ints at
Moved out the function from vtls in a the new lib/rand.c file, since it isn't
a TLS function and vtls already provides Curl_ssl_random() for this function
All tests still run fine.
Comments, suggestions or complaints? Fire them away!
 = mostly for OpenSSL versions before 1.1.0
 = The gskit, polarssl and mbedtls backends don't have random data
functions in libcurl so they get the same "lame" version provided as when
built entirely without TLS support built-in.
-- / daniel.haxx.se
- text/x-diff attachment: 0001-Curl_rand-fixed-and-moved-to-rand.c.patch