Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > a3cf476e2484c108c690618ba5d3caa3 > files > 26

openssh-6.1p1-11.fc18.src.rpm

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