summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2015-05-03 00:00:35 +0800
committerMatt Johnston <matt@ucc.asn.au>2015-05-03 00:00:35 +0800
commit0e1dee828a80ad043d1122eb30931cba00ea7267 (patch)
treefb32b226b1b9581f59d4998696e325c3c8105596
parentcbdc1f075387bd006fe63f79edcf653e72701b1a (diff)
Make sure kexfirstinitialise is called early enough
-rw-r--r--cli-session.c2
-rw-r--r--common-session.c2
-rw-r--r--svr-session.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/cli-session.c b/cli-session.c
index 815f5b6..7019e93 100644
--- a/cli-session.c
+++ b/cli-session.c
@@ -124,6 +124,8 @@ void cli_session(int sock_in, int sock_out, struct dropbear_progress_connection
/* Exchange identification */
send_session_identification();
+ kexfirstinitialise(); /* initialise the kex state */
+
send_msg_kexinit();
session_loop(cli_sessionloop);
diff --git a/common-session.c b/common-session.c
index 083b5c5..e12584c 100644
--- a/common-session.c
+++ b/common-session.c
@@ -90,8 +90,6 @@ void common_session_init(int sock_in, int sock_out) {
ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[0]);
ses.maxfd = MAX(ses.maxfd, ses.signal_pipe[1]);
- kexfirstinitialise(); /* initialise the kex state */
-
ses.writepayload = buf_new(TRANS_MAX_PAYLOAD_LEN);
ses.transseq = 0;
diff --git a/svr-session.c b/svr-session.c
index 8485905..d638d59 100644
--- a/svr-session.c
+++ b/svr-session.c
@@ -138,6 +138,8 @@ void svr_session(int sock, int childpipe) {
/* exchange identification, version etc */
send_session_identification();
+
+ kexfirstinitialise(); /* initialise the kex state */
/* start off with key exchange */
send_msg_kexinit();