- Changed the used random function pointer to more flexible format. Renamed havege_rand() to havege_random() to prevent mistakes. Lots of changes as a consequence in library code and programs

diff --git a/programs/test/benchmark.c b/programs/test/benchmark.c
index 091a9cf..1588b47 100644
--- a/programs/test/benchmark.c
+++ b/programs/test/benchmark.c
@@ -47,12 +47,27 @@
 
 #define BUFSIZE 1024
 
-static int myrand( void *rng_state )
+static int myrand( void *rng_state, unsigned char *output, size_t len )
 {
+    size_t use_len;
+    int rnd;
+
     if( rng_state != NULL )
         rng_state  = NULL;
 
-    return( rand() );
+    while( len > 0 )
+    {
+        use_len = len;
+        if( use_len > sizeof(int) )
+            use_len = sizeof(int);
+
+        rnd = rand();
+        memcpy( output, &rnd, use_len );
+        output += use_len;
+        len -= use_len;
+    }
+
+    return( 0 );
 }
 
 unsigned char buf[BUFSIZE];
diff --git a/programs/test/ssl_test.c b/programs/test/ssl_test.c
index 683963c..8bac4b2 100644
--- a/programs/test/ssl_test.c
+++ b/programs/test/ssl_test.c
@@ -257,7 +257,7 @@
 
     ssl_set_authmode( &ssl, SSL_VERIFY_NONE );
 
-    ssl_set_rng( &ssl, havege_rand, &hs );
+    ssl_set_rng( &ssl, havege_random, &hs );
     ssl_set_dbg( &ssl, my_debug, opt );
     ssl_set_bio( &ssl, net_recv, &client_fd,
                        net_send, &client_fd );