rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
f09e2e
diff -up openssh-5.9p0/entropy.c.randclean openssh-5.9p0/entropy.c
f09e2e
--- openssh-5.9p0/entropy.c.randclean	2011-08-30 13:52:45.000000000 +0200
f09e2e
+++ openssh-5.9p0/entropy.c	2011-08-30 13:57:44.630111338 +0200
f09e2e
@@ -217,6 +217,9 @@ seed_rng(void)
f09e2e
 		fatal("OpenSSL version mismatch. Built against %lx, you "
f09e2e
 		    "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
f09e2e
 
f09e2e
+	/* clean the PRNG status when exiting the program */
f09e2e
+	atexit(RAND_cleanup);
f09e2e
+
f09e2e
 #ifndef OPENSSL_PRNG_ONLY
f09e2e
 	if (RAND_status() == 1) {
f09e2e
 		debug3("RNG is ready, skipping seeding");