Fix using /dev/urandom since it wasn't working
authorMartin Johansson <martin@fatbob.nu>
Tue, 14 May 2013 20:39:34 +0000 (22:39 +0200)
committerMartin Johansson <martin@fatbob.nu>
Tue, 14 May 2013 20:39:34 +0000 (22:39 +0200)
src/ssl.c
src/ssl.h

index 86e35a5f1fed9dd795cba995cf18d21dd35ff7cb..2ea92dbf8129509d38afe48e63178140f35b99a5 100644 (file)
--- a/src/ssl.c
+++ b/src/ssl.c
@@ -161,6 +161,7 @@ int urandom_bytes(void *ctx, unsigned char *dest, size_t len)
                        continue;
                len -= cur;
        }
+       return 0;
 }
 #endif
 
index 2aba396aae6f6d902a5f9826a597c2f05f64c2cc..75b44a09c4578b482dd29ae4d1f7aafa43cb0063 100644 (file)
--- a/src/ssl.h
+++ b/src/ssl.h
@@ -49,6 +49,7 @@
 #endif
 
 #ifdef USE_POLARSSL_HAVEGE
+#include <polarssl/havege.h>
     #if (POLARSSL_VERSION_MINOR >= 1)
         #define HAVEGE_RAND (havege_random)
         #define RAND_bytes(_dst_, _size_) do { \