summaryrefslogtreecommitdiff
path: root/lib/rand.c
Commit message (Collapse)AuthorAgeFilesLines
* copyright: fix year rangesDaniel Stenberg2020-11-051-1/+1
| | | | Follow-up from 4d2f8006777
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* PolarSSL: deprecate support step 1. Removed from configure.Daniel Stenberg2019-05-221-3/+2
| | | | | | | | Also removed mentions from most docs. Discussed: https://curl.haxx.se/mail/lib-2019-05/0045.html Closes #3888
* rand: add comment to skip a clang-tidy false positiveDaniel Stenberg2018-10-271-1/+3
|
* rand: fix typoJay Satiro2018-05-161-1/+1
|
* rand: add a clang-analyzer work-aroundDaniel Stenberg2017-12-131-0/+6
| | | | | | scan-build would warn on a potential access of an uninitialized buffer. I deem it a false positive and had to add this somewhat ugly work-around to silence it.
* time: rename Curl_tvnow to Curl_nowDaniel Stenberg2017-10-251-1/+1
| | | | | | | | | | ... since the 'tv' stood for timeval and this function does not return a timeval struct anymore. Also, cleaned up the Curl_timediff*() functions to avoid typecasts and clean up the descriptive comments. Closes #2011
* timediff: return timediff_t from the time diff functionsDaniel Stenberg2017-10-251-1/+1
| | | | | | | | | | | | | | | ... to cater for systems with unsigned time_t variables. - Renamed the functions to curlx_timediff and Curl_timediff_us. - Added overflow protection for both of them in either direction for both 32 bit and 64 bit time_ts - Reprefixed the curlx_time functions to use Curl_* Reported-by: Peter Piekarski Fixes #2004 Closes #2005
* timeval: struct curltime is a struct timeval replacementDaniel Stenberg2017-07-281-1/+1
| | | | | | | | | ... to make all libcurl internals able to use the same data types for the struct members. The timeval struct differs subtly on several platforms so it makes it cumbersome to use everywhere. Ref: #1652 Closes #1693
* assert: avoid, use DEBUGASSERT instead!Daniel Stenberg2017-05-221-1/+1
| | | | | | | ... as it does extra checks to actually work. Reported-by: jonrumsey at github Fixes #1504
* rand: treat fake entropy the same regardless of endiannessJay Satiro2017-05-081-7/+54
| | | | | | | | | | | | | | | | | When the random seed is purposely made predictable for testing purposes by using the CURL_ENTROPY environment variable, process that data in an endian agnostic way so the the initial random seed is the same regardless of endianness. - Change Curl_rand to write to a char array instead of int array. - Add Curl_rand_hex to write random hex characters to a buffer. Fixes #1315 Closes #1468 Co-authored-by: Daniel Stenberg Reported-by: Michael Kaufmann
* spelling fixesklemens2017-03-261-2/+2
| | | | Closes #1356
* rand: added missing #ifdef HAVE_FCNTL_H around fcntl.h headerSergii Pylypenko2017-02-231-0/+2
| | | | Closes #1285
* randit: store the value in the bufferKamil Dudka2016-12-211-1/+1
|
* rand: pass in number of randoms as an unsigned argumentDaniel Stenberg2016-11-211-2/+3
|
* rand: Fix potentially uninitialized result warningJay Satiro2016-11-201-1/+1
|
* Curl_rand: fixed and moved to rand.cDaniel Stenberg2016-11-141-0/+129
Now Curl_rand() is made to fail if it cannot get the necessary random level. Changed the proto of Curl_rand() slightly to provide a number of ints at once. Moved out from vtls, since it isn't a TLS function and vtls provides Curl_ssl_random() for this to use. Discussion: https://curl.haxx.se/mail/lib-2016-11/0119.html