aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls/vtls.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-06-03 20:04:46 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-07-30 00:05:47 +0200
commit8dfd22089cac13f718815eb60581ad392b7f106e (patch)
treec03f2cb748342b44dda4b0b99df3a3d6f5f50492 /lib/vtls/vtls.h
parent37faf55e170ecaa06846d0c9a1a37b6bed39ae57 (diff)
vtls: make the random function mandatory in the TLS backend
To force each backend implementation to really attempt to provide proper random. If a proper random function is missing, then we can explicitly make use of the default one we use when TLS support is missing. This commit makes sure it works for darwinssl, gnutls, nss and openssl.
Diffstat (limited to 'lib/vtls/vtls.h')
-rw-r--r--lib/vtls/vtls.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/vtls/vtls.h b/lib/vtls/vtls.h
index d309da6e4..5f58cbd98 100644
--- a/lib/vtls/vtls.h
+++ b/lib/vtls/vtls.h
@@ -88,7 +88,10 @@ void Curl_ssl_kill_session(struct curl_ssl_session *session);
/* delete a session from the cache */
void Curl_ssl_delsessionid(struct connectdata *conn, void *ssl_sessionid);
-/* get N random bytes into the buffer */
+/* get N random bytes into the buffer, return 0 if a find random is filled
+ in */
+int Curl_ssl_random(struct SessionHandle *data, unsigned char *buffer,
+ size_t length);
void Curl_ssl_md5sum(unsigned char *tmp, /* input */
size_t tmplen,
unsigned char *md5sum, /* output */
@@ -96,9 +99,6 @@ void Curl_ssl_md5sum(unsigned char *tmp, /* input */
#define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
-#ifdef have_curlssl_random
-#define HAVE_CURL_SSL_RANDOM
-#endif
#ifdef have_curlssl_md5sum
#define HAVE_CURL_SSL_MD5SUM
#endif