diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-05-24 14:16:58 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-05-24 14:16:58 +0800 |
commit | 701d43b8594365b55421e8bc4c53efa920c09ed5 (patch) | |
tree | aceb60a25d26b8d5f3b132df40e59c9218f8b66e /common-kex.c | |
parent | 79bedc90a1efc9ba0b2c6565bd5264a7817e68d4 (diff) |
send and handle SSH_MSG_EXT_INFO only at the correct point
- other fixes for rsa pubkey auth
- only include ext-info handling when rsa pubkey auth is compiled
Diffstat (limited to 'common-kex.c')
-rw-r--r-- | common-kex.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common-kex.c b/common-kex.c index 7063c81..1ef1946 100644 --- a/common-kex.c +++ b/common-kex.c @@ -175,6 +175,9 @@ void send_msg_newkeys() { /* set up our state */ ses.kexstate.sentnewkeys = 1; + if (ses.kexstate.donefirstkex) { + ses.kexstate.donesecondkex = 1; + } ses.kexstate.donefirstkex = 1; ses.dataallowed = 1; /* we can send other packets again now */ gen_new_keys(); @@ -197,8 +200,6 @@ void recv_msg_newkeys() { /* Set up the kex for the first time */ void kexfirstinitialise() { - ses.kexstate.donefirstkex = 0; - #ifdef DISABLE_ZLIB ses.compress_algos = ssh_nocompress; #else @@ -833,6 +834,7 @@ static void read_kex_algos() { } #endif +#if DROPBEAR_EXT_INFO /* Determine if SSH_MSG_EXT_INFO messages should be sent. Should be done for the first key exchange. Only required on server side for server-sig-algs */ @@ -843,6 +845,7 @@ static void read_kex_algos() { } } } +#endif algo = buf_match_algo(ses.payload, sshkex, kexguess2, &goodguess); allgood &= goodguess; |