Prefer /dev/random on MacOS since it's always there and have good performance.
authorLove Hörnquist Åstrand <lha@kth.se>
Sun, 22 Mar 2009 17:20:07 +0000 (17:20 +0000)
committerLove Hörnquist Åstrand <lha@kth.se>
Sun, 22 Mar 2009 17:20:07 +0000 (17:20 +0000)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24900 ec53bebd-3082-4978-b11e-865c3cabbd6b

lib/hcrypto/rand.c

index b8ac2155d11b2685017a38e21fd37f23c2a6d5ba..a61c9cdfb2d993c2260319a0adea8c28f71dbc8b 100644 (file)
@@ -62,7 +62,11 @@ init_method(void)
 {
     if (selected_meth != NULL)
        return;
+#ifdef __APPLE__
+    selected_meth = &hc_rand_unix_method;
+#else
     selected_meth = &hc_rand_fortuna_method;
+#endif
 }
 
 /**