summaryrefslogtreecommitdiffhomepage
path: root/svr-session.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-02-11 15:15:37 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-02-11 15:15:37 +0000
commit1eb9209afef2046bbf74f8d2ffb0f357bdb992bb (patch)
treeb399a58bdea3ca21cd2ffac2ec892d6b2009ee4e /svr-session.c
parentfcba907998dd6e38b82cfcc05d632dfdb0baf9d1 (diff)
Only read /dev/random once when the program starts
rather than for every connection, to "conserve entropy". --HG-- extra : convert_revision : 21df240b71c0af8454725dec9abb428dd4bb97a2
Diffstat (limited to 'svr-session.c')
-rw-r--r--svr-session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/svr-session.c b/svr-session.c
index 408209d..70029f8 100644
--- a/svr-session.c
+++ b/svr-session.c
@@ -78,7 +78,9 @@ void svr_session(int sock, int childpipe,
char* remotehost, char *addrstring) {
struct timeval timeout;
-
+
+ reseedrandom();
+
crypto_init();
common_session_init(sock, remotehost);
@@ -110,8 +112,6 @@ void svr_session(int sock, int childpipe,
/* exchange identification, version etc */
session_identification();
- seedrandom();
-
/* start off with key exchange */
send_msg_kexinit();