diff svr-session.c @ 272:3be7ae2e8dfa

Only read /dev/random once when the program starts rather than for every connection, to "conserve entropy".
author Matt Johnston <matt@ucc.asn.au>
date Sat, 11 Feb 2006 15:15:37 +0000
parents 364a75cfebab
children 973fccb59ea4 a588558bfc94
line wrap: on
line diff
--- a/svr-session.c	Wed Feb 01 09:05:13 2006 +0000
+++ b/svr-session.c	Sat Feb 11 15:15:37 2006 +0000
@@ -78,7 +78,9 @@
 		char* remotehost, char *addrstring) {
 
 	struct timeval timeout;
-	
+
+    reseedrandom();
+
 	crypto_init();
 	common_session_init(sock, remotehost);
 
@@ -110,8 +112,6 @@
 	/* exchange identification, version etc */
 	session_identification();
 
-	seedrandom();
-
 	/* start off with key exchange */
 	send_msg_kexinit();