aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls/curl_darwinssl.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/curl_darwinssl.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/curl_darwinssl.h')
-rw-r--r--lib/vtls/curl_darwinssl.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/vtls/curl_darwinssl.h b/lib/vtls/curl_darwinssl.h
index 432d3d7ce..25ad3d419 100644
--- a/lib/vtls/curl_darwinssl.h
+++ b/lib/vtls/curl_darwinssl.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2012 - 2013, Nick Zitzmann, <nickzman@gmail.com>.
+ * Copyright (C) 2012 - 2014, Nick Zitzmann, <nickzman@gmail.com>.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -44,16 +44,14 @@ int Curl_darwinssl_check_cxn(struct connectdata *conn);
bool Curl_darwinssl_data_pending(const struct connectdata *conn,
int connindex);
-void Curl_darwinssl_random(struct SessionHandle *data,
- unsigned char *entropy,
- size_t length);
+int Curl_darwinssl_random(unsigned char *entropy,
+ size_t length);
void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
size_t tmplen,
unsigned char *md5sum, /* output */
size_t md5len);
/* this backend provides these functions: */
-#define have_curlssl_random 1
#define have_curlssl_md5sum 1
/* API setup for SecureTransport */
@@ -71,7 +69,7 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
#define curlssl_version Curl_darwinssl_version
#define curlssl_check_cxn Curl_darwinssl_check_cxn
#define curlssl_data_pending(x,y) Curl_darwinssl_data_pending(x, y)
-#define curlssl_random(x,y,z) Curl_darwinssl_random(x,y,z)
+#define curlssl_random(x,y,z) Curl_darwinssl_random(y,z)
#define curlssl_md5sum(a,b,c,d) Curl_darwinssl_md5sum(a,b,c,d)
#endif /* USE_DARWINSSL */