diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-04 19:52:53 +0200 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-04 19:52:53 +0200 |
commit | 238abf6a14d6ed038918fa35f618089230e68fd6 (patch) | |
tree | 7a856c03b822853fc08ef711e6a0bf05c738e6a0 /kexdh.c | |
parent | - (bal) Oops.. Missed including kexdh.c and kexgex.c in OpenBSD sync. (diff) | |
download | openssh-238abf6a14d6ed038918fa35f618089230e68fd6.tar.xz openssh-238abf6a14d6ed038918fa35f618089230e68fd6.zip |
- markus@cvs.openbsd.org 2001/04/04 09:48:35
[kex.c kex.h kexdh.c kexgex.c packet.c sshconnect2.c sshd.c]
don't sent multiple kexinit-requests.
send newkeys, block while waiting for newkeys.
fix comments.
Diffstat (limited to 'kexdh.c')
-rw-r--r-- | kexdh.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdh.c,v 1.2 2001/04/03 23:32:12 markus Exp $"); +RCSID("$OpenBSD: kexdh.c,v 1.3 2001/04/04 09:48:34 markus Exp $"); #include <openssl/crypto.h> #include <openssl/bn.h> @@ -170,8 +170,8 @@ kexdh_client(Kex *kex) shared_secret ); xfree(server_host_key_blob); - DH_free(dh); BN_free(dh_server_pub); + DH_free(dh); if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) fatal("key_verify failed for server_host_key"); @@ -187,7 +187,7 @@ kexdh_client(Kex *kex) kex_derive_keys(kex, hash, shared_secret); BN_clear_free(shared_secret); - kex_send_newkeys(); + kex_finish(kex); } /* server */ @@ -283,15 +283,15 @@ kexdh_server(Kex *kex) packet_put_bignum2(dh->pub_key); /* f */ packet_put_string((char *)signature, slen); 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 |