summaryrefslogtreecommitdiffstats
path: root/kex.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-02-13 13:54:06 +1100
committerDamien Miller <djm@mindrot.org>2002-02-13 13:54:06 +1100
commitbc27d4e987caa3a9d9bb965883f6f551317ddf02 (patch)
treec2b76c7ef8b789a47a8136f8b24df4711d697869 /kex.c
parentafcc22542e97b2a8893b11a8c3f799ef95db9319 (diff)
- markus@cvs.openbsd.org 2002/02/11 16:10:15
[kex.c] restore kexinit handler if we reset the dispatcher, this unbreaks rekeying s/kex_clear_dispatch/kex_reset_dispatch/
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kex.c b/kex.c
index b58b12f4..02c9780a 100644
--- a/kex.c
+++ b/kex.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: kex.c,v 1.43 2002/01/25 22:07:40 markus Exp $");
+RCSID("$OpenBSD: kex.c,v 1.44 2002/02/11 16:10:15 markus Exp $");
#include <openssl/crypto.h>
@@ -113,16 +113,17 @@ kex_protocol_error(int type, u_int32_t seq, void *ctxt)
}
static void
-kex_clear_dispatch(void)
+kex_reset_dispatch(void)
{
dispatch_range(SSH2_MSG_TRANSPORT_MIN,
SSH2_MSG_TRANSPORT_MAX, &kex_protocol_error);
+ dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
}
void
kex_finish(Kex *kex)
{
- kex_clear_dispatch();
+ kex_reset_dispatch();
packet_start(SSH2_MSG_NEWKEYS);
packet_send();
@@ -200,8 +201,7 @@ kex_setup(char *proposal[PROPOSAL_MAX])
kex->done = 0;
kex_send_kexinit(kex); /* we start */
- kex_clear_dispatch();
- dispatch_set(SSH2_MSG_KEXINIT, &kex_input_kexinit);
+ kex_reset_dispatch();
return kex;
}