diff options
author | Damien Miller <djm@mindrot.org> | 2004-06-15 02:30:09 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-06-15 02:30:09 +0200 |
commit | f675fc4948b2ec2c9ff86bcdd58e00947f0e319b (patch) | |
tree | babb42f0a29e7b24284a731cb894454d8f80fc97 /kexdhc.c | |
parent | - pedro@cvs.openbsd.org 2004/06/03 12:22:20 (diff) | |
download | openssh-f675fc4948b2ec2c9ff86bcdd58e00947f0e319b.tar.xz openssh-f675fc4948b2ec2c9ff86bcdd58e00947f0e319b.zip |
- djm@cvs.openbsd.org 2004/06/13 12:53:24
[dh.c dh.h kex.c kex.h kexdhc.c kexdhs.c monitor.c myproposal.h]
[ssh-keyscan.c sshconnect2.c sshd.c]
implement diffie-hellman-group14-sha1 kex method (trivial extension to
existing diffie-hellman-group1-sha1); ok markus@
Diffstat (limited to 'kexdhc.c')
-rw-r--r-- | kexdhc.c | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdhc.c,v 1.1 2003/02/16 17:09:57 markus Exp $"); +RCSID("$OpenBSD: kexdhc.c,v 1.2 2004/06/13 12:53:24 djm Exp $"); #include "xmalloc.h" #include "key.h" @@ -44,7 +44,16 @@ kexdh_client(Kex *kex) u_int klen, kout, slen, sbloblen; /* generate and send 'e', client DH public key */ - dh = dh_new_group1(); + switch (kex->kex_type) { + case KEX_DH_GRP1_SHA1: + dh = dh_new_group1(); + break; + case KEX_DH_GRP14_SHA1: + dh = dh_new_group14(); + break; + default: + fatal("%s: Unexpected KEX type %d", __func__, kex->kex_type); + } dh_gen_key(dh, kex->we_need * 8); packet_start(SSH2_MSG_KEXDH_INIT); packet_put_bignum2(dh->pub_key); |