diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-11-11 14:53:36 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-11-14 08:23:52 +0100 |
commit | f682156a4fc6c43fb38db4abda49b9a1bc1ed368 (patch) | |
tree | 32b49aeaefc66c54426f8e7e5e9c2d9aced6147d /lib/vtls/vtls.h | |
parent | 050aa803096f6d745a173d5810c65dd829f2f8b2 (diff) |
Curl_rand: fixed and moved to rand.c
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
Diffstat (limited to 'lib/vtls/vtls.h')
-rw-r--r-- | lib/vtls/vtls.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h index a41ecc325..69d206f52 100644 --- a/lib/vtls/vtls.h +++ b/lib/vtls/vtls.h @@ -56,8 +56,6 @@ bool Curl_clone_ssl_config(struct ssl_config_data* source, struct ssl_config_data* dest); void Curl_free_ssl_config(struct ssl_config_data* sslc); -unsigned int Curl_rand(struct Curl_easy *); - int Curl_ssl_backend(void); #ifdef USE_SSL @@ -140,10 +138,9 @@ void Curl_ssl_kill_session(struct curl_ssl_session *session); */ void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid); -/* get N random bytes into the buffer, return 0 if a find random is filled - in */ -int Curl_ssl_random(struct Curl_easy *data, unsigned char *buffer, - size_t length); +/* get N random bytes into the buffer */ +CURLcode Curl_ssl_random(struct Curl_easy *data, unsigned char *buffer, + size_t length); CURLcode Curl_ssl_md5sum(unsigned char *tmp, /* input */ size_t tmplen, unsigned char *md5sum, /* output */ |