]> andersk Git - openssh.git/commitdiff
Fix fixed egd code
authordjm <djm>
Mon, 26 Jun 2000 03:55:31 +0000 (03:55 +0000)
committerdjm <djm>
Mon, 26 Jun 2000 03:55:31 +0000 (03:55 +0000)
ChangeLog
entropy.c

index 9fd1c78641d39e5b932150ee3d05bb57674c76bc..f6f70c91e895c998301f4d0e9225918de734e1bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
  - (djm) Added password expiry checking (no password change support)
  - (djm) Make EGD failures non-fatal if OpenSSL's entropy pool is still OK
    based on patch from Lutz Jaenicke <Lutz.Jaenicke@aet.TU-Cottbus.DE>
+ - (djm) Fix fixed EGD code.
  - OpenBSD CVS update
    - provos@cvs.openbsd.org  2000/06/25 14:17:58
      [channels.c]
index 96e6e85fb247061fcf4748638b316d95419c18b3..1857e7c833b22f11cb8dfab65496be35a45b1da4 100644 (file)
--- a/entropy.c
+++ b/entropy.c
@@ -158,11 +158,13 @@ seed_rng(void)
        
        debug("Seeding random number generator");
 
-       if (!get_random_bytes(buf, sizeof(buf)) && !RAND_status())
-               fatal("Entropy collection failed and entropy exhausted");
-
-       RAND_add(buf, sizeof(buf), sizeof(buf));
-
+       if (!get_random_bytes(buf, sizeof(buf))) {
+               if (!RAND_status())
+                       fatal("Entropy collection failed and entropy exhausted");
+       } else {
+               RAND_add(buf, sizeof(buf), sizeof(buf));
+       }
+       
        memset(buf, '\0', sizeof(buf));
 }
 
This page took 0.047079 seconds and 5 git commands to generate.