aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2012-01-18 23:17:54 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-01-18 23:17:54 +0100
commit61d31a3caf8bced6d142c43b10e0887af744f50c (patch)
tree536193742b9eccb165db57b19015a59f786b1618
parent4b9af77d542cb8ee8ddd5217141cce489ac875ea (diff)
polarssl: havege_rand is not present in version 1.1.0
... it is now named havege_random! Reported by: Robert Schumann Bug: http://curl.haxx.se/mail/lib-2012-01/0178.html
-rw-r--r--lib/polarssl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/polarssl.c b/lib/polarssl.c
index 09446f995..89da87fcd 100644
--- a/lib/polarssl.c
+++ b/lib/polarssl.c
@@ -65,6 +65,15 @@
/* The last #include file should be: */
#include "memdebug.h"
+/* version dependent differences */
+#if POLARSSL_VERSION_NUMBER < 0x01010000
+/* the old way */
+#define HAVEGE_RANDOM havege_rand
+#else
+/* from 1.1.0 */
+#define HAVEGE_RANDOM havege_random
+#endif
+
/* Define this to enable lots of debugging for PolarSSL */
#undef POLARSSL_DEBUG
@@ -189,7 +198,7 @@ Curl_polarssl_connect(struct connectdata *conn,
ssl_set_endpoint(&conn->ssl[sockindex].ssl, SSL_IS_CLIENT);
ssl_set_authmode(&conn->ssl[sockindex].ssl, SSL_VERIFY_OPTIONAL);
- ssl_set_rng(&conn->ssl[sockindex].ssl, havege_rand,
+ ssl_set_rng(&conn->ssl[sockindex].ssl, HAVEGE_RANDOM,
&conn->ssl[sockindex].hs);
ssl_set_bio(&conn->ssl[sockindex].ssl,
net_recv, &conn->sock[sockindex],