Change RAND_poll for Unix to try a number of devices and only read
[openssl.git] / e_os.h
diff --git a/e_os.h b/e_os.h
index f44f39300c1dfc6ce722616bf2bef56cea9bd148..ba53b18b9cd9cbc3779b9669e082bc8636e5afc8 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -77,9 +77,9 @@ extern "C" {
 #endif
 
 #ifndef DEVRANDOM
-/* set this to your 'random' device if you have one.
- * My default, we will try to read this file */
-#define DEVRANDOM "/dev/urandom"
+/* set this to a comma-separated list of 'random' device files to try out.
+ * My default, we will try to read at least one of these files */
+#define DEVRANDOM "/dev/random","/dev/srandom","/dev/urandom"
 #endif
 
 #if defined(__MWERKS__) && defined(macintosh)
@@ -245,6 +245,8 @@ extern "C" {
 #    define RFILE              ".rnd"
 #    define LIST_SEPARATOR_CHAR ','
 #    define NUL_DEV            "NLA0:"
+  /* We don't have any well-defined random devices on VMS, yet... */
+#    undef DEVRANDOM
   /* We need to do this since VMS has the following coding on status codes:
 
      Bits 0-2: status type: 0 = warning, 1 = success, 2 = error, 3 = info ...