summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/kexgex.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-04-04 09:48:36 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-04-04 09:48:36 +0000
commitd00d7919a437b24a46745a77814668a129d6e8e0 (patch)
treef2227319c44734ba1f004d01bae22dca0c9ba145 /usr.bin/ssh/kexgex.c
parent1221231bf93b54ae324444e29253917845b0945f (diff)
don't sent multiple kexinit-requests.
send newkeys, block while waiting for newkeys. fix comments.
Diffstat (limited to 'usr.bin/ssh/kexgex.c')
-rw-r--r--usr.bin/ssh/kexgex.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/usr.bin/ssh/kexgex.c b/usr.bin/ssh/kexgex.c
index 6e8be78b552..df7e668b4ab 100644
--- a/usr.bin/ssh/kexgex.c
+++ b/usr.bin/ssh/kexgex.c
@@ -24,7 +24,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: kexgex.c,v 1.2 2001/04/03 23:32:12 markus Exp $");
+RCSID("$OpenBSD: kexgex.c,v 1.3 2001/04/04 09:48:34 markus Exp $");
#include <openssl/bn.h>
@@ -228,6 +228,8 @@ kexgex_client(Kex *kex)
dh_server_pub,
shared_secret
);
+ /* have keys, free DH */
+ DH_free(dh);
xfree(server_host_key_blob);
BN_free(dh_server_pub);
@@ -242,14 +244,10 @@ kexgex_client(Kex *kex)
kex->session_id = xmalloc(kex->session_id_len);
memcpy(kex->session_id, hash, kex->session_id_len);
}
-
kex_derive_keys(kex, hash, shared_secret);
BN_clear_free(shared_secret);
- kex_send_newkeys();
-
- /* have keys, free DH */
- DH_free(dh);
+ kex_finish(kex);
}
/* server */
@@ -391,14 +389,13 @@ kexgex_server(Kex *kex)
packet_send();
xfree(signature);
xfree(server_host_key_blob);
+ /* have keys, free DH */
+ DH_free(dh);
kex_derive_keys(kex, hash, shared_secret);
BN_clear_free(shared_secret);
- kex_send_newkeys();
-
- /* have keys, free DH */
- DH_free(dh);
+ kex_finish(kex);
}
void