aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-07-30 20:59:16 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-07-30 20:59:16 +0200
commit0e811d8c59f95bcbddd1d07410e4a8c4d8fb77cf (patch)
tree7527aaf7261144b080a723abde96d770c8586d43 /lib/vtls
parentdf52f3500cf2215f91fb332081924e09af886824 (diff)
polarssl: provide a (weak) random function
This now provides a weak random function since PolarSSL doesn't have a quick and easy way to provide a good one. It does however provide the framework to make one so it _can_ and _should_ be done...
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/polarssl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/vtls/polarssl.h b/lib/vtls/polarssl.h
index af3b28b89..6c5b872c8 100644
--- a/lib/vtls/polarssl.h
+++ b/lib/vtls/polarssl.h
@@ -63,5 +63,10 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
#define curlssl_check_cxn(x) (x=x, -1)
#define curlssl_data_pending(x,y) (x=x, y=y, 0)
+/* This might cause libcurl to use a weeker random!
+ TODO: implement proper use of Polarssl's CTR-DRBG or HMAC-DRBG and use that
+*/
+#define curlssl_random(x,y,z) (x=x, y=y, z=z, CURLE_NOT_BUILT_IN)
+
#endif /* USE_POLARSSL */
#endif /* HEADER_CURL_POLARSSL_H */