diff options
author | AlexSm <alex@ydb.tech> | 2023-12-22 17:10:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-22 17:10:22 +0100 |
commit | 148f920350c60c0ca2d89b637a5aea9093eee450 (patch) | |
tree | 6314b1433dac833398c333731e83f0ad77e81a0b /contrib/libs/curl/lib/rand.c | |
parent | 7116d46ae7c0259b5f9d489de263f8701e432b1c (diff) | |
download | ydb-148f920350c60c0ca2d89b637a5aea9093eee450.tar.gz |
Library import 2 (#639)
Diffstat (limited to 'contrib/libs/curl/lib/rand.c')
-rw-r--r-- | contrib/libs/curl/lib/rand.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/contrib/libs/curl/lib/rand.c b/contrib/libs/curl/lib/rand.c index 7d24765ccd..2e7e7e8238 100644 --- a/contrib/libs/curl/lib/rand.c +++ b/contrib/libs/curl/lib/rand.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -27,18 +27,10 @@ #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif -#ifdef HAVE_ARPA_INET_H -#include <arpa/inet.h> -#endif -#ifdef HAVE_ARC4RANDOM -/* Some platforms might have the prototype missing (ubuntu + libressl) */ -uint32_t arc4random(void); -#endif #include <curl/curl.h> #include "vtls/vtls.h" #include "sendf.h" -#include "timeval.h" #include "rand.h" /* The last 3 #include files should be in this order */ @@ -147,11 +139,6 @@ static CURLcode randit(struct Curl_easy *data, unsigned int *rnd) } #endif -#ifdef HAVE_ARC4RANDOM - *rnd = (unsigned int)arc4random(); - return CURLE_OK; -#endif - #if defined(RANDOM_FILE) && !defined(WIN32) if(!seeded) { /* if there's a random file to read a seed from, use it */ @@ -183,8 +170,8 @@ 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. + * Curl_rand() stores 'num' number of random unsigned integers in the buffer + * 'rndptr' points to. * * If libcurl is built without TLS support or with a TLS backend that lacks a * proper random API (rustls, Gskit or mbedTLS), this function will use "weak" |