]> sjero.net Git - wget/commitdiff
[svn] Warn the user when using weak random seed.
authorhniksic <devnull@localhost>
Tue, 18 Nov 2003 22:28:01 +0000 (14:28 -0800)
committerhniksic <devnull@localhost>
Tue, 18 Nov 2003 22:28:01 +0000 (14:28 -0800)
src/ChangeLog
src/gen_sslfunc.c

index a5f15ff9da0e36e118b6e76e74adbbc72e0570d7..6b39e88fff2158e0702a55abec04c8cbef1ecb90 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * gen_sslfunc.c (ssl_init_prng): Warn the user when using a weak
+       random seed.
+
 2003-11-18  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * host.c (address_list_contains): Renamed address_list_find to
index 8f6058a6cc50a2c1acd5a09490cdbda1cd041fa9..c21e1679b07c9864e09ef44ad28a6b84c4af1ce3 100644 (file)
@@ -98,12 +98,14 @@ ssl_init_prng (void)
     return;
 #endif
 
-  /* Still not enough randomness, presumably because neither random
-     file nor EGD have been available.  Use the stupidest possible
-     method -- seed OpenSSL's PRNG with the system's PRNG.  This is
-     insecure in the cryptographic sense, but people who care about
-     security will use /dev/random or their own source of randomness
-     anyway.  */
+  /* Still not enough randomness, most likely because neither
+     /dev/random nor EGD were available.  Resort to a simple and
+     stupid method -- seed OpenSSL's PRNG with libc PRNG.  This is
+     cryptographically weak, but people who care about strong
+     cryptography should install /dev/random (default on Linux) or
+     specify their own source of randomness anyway.  */
+
+  logprintf (LOG_VERBOSE, _("Warning: using a weak random seed.\n"));
 
   while (RAND_status () == 0 && maxrand-- > 0)
     {