summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/rand.c')
-rw-r--r--libs/libcurl/src/rand.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libs/libcurl/src/rand.c b/libs/libcurl/src/rand.c
index 00ba581689..be106e6ad8 100644
--- a/libs/libcurl/src/rand.c
+++ b/libs/libcurl/src/rand.c
@@ -37,7 +37,7 @@
#include "urldata.h"
#include "vtls/vtls.h"
#include "sendf.h"
-#include "timeval.h"
+#include "curlx/timeval.h"
#include "rand.h"
#include "escape.h"
@@ -130,7 +130,7 @@ static CURLcode weak_random(struct Curl_easy *data,
static bool seeded = FALSE;
unsigned int rnd;
if(!seeded) {
- struct curltime now = Curl_now();
+ struct curltime now = curlx_now();
randseed += (unsigned int)now.tv_usec + (unsigned int)now.tv_sec;
randseed = randseed * 1103515245 + 12345;
randseed = randseed * 1103515245 + 12345;
@@ -191,12 +191,11 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd,
* Curl_rand() stores 'num' number of random unsigned characters in the buffer
* 'rnd' points to.
*
- * If libcurl is built without TLS support or with a TLS backend that lacks a
- * proper random API (Rustls or mbedTLS), this function will use "weak"
- * random.
+ * If libcurl is built without TLS support or arc4random, this function will
+ * use "weak" random.
*
- * When built *with* TLS support and a backend that offers strong random, it
- * will return error if it cannot provide strong random values.
+ * When built *with* TLS support, it will return error if it cannot provide
+ * strong random values.
*
* NOTE: 'data' may be passed in as NULL when coming from external API without
* easy handle!