summaryrefslogtreecommitdiff
path: root/kexdhc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexdhc.c')
-rw-r--r--kexdhc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kexdhc.c b/kexdhc.c
index af259f16a..ad3975f09 100644
--- a/kexdhc.c
+++ b/kexdhc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexdhc.c,v 1.18 2015/01/26 06:10:03 djm Exp $ */ 1/* $OpenBSD: kexdhc.c,v 1.19 2016/05/02 10:26:04 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -63,8 +63,15 @@ kexdh_client(struct ssh *ssh)
63 kex->dh = dh_new_group1(); 63 kex->dh = dh_new_group1();
64 break; 64 break;
65 case KEX_DH_GRP14_SHA1: 65 case KEX_DH_GRP14_SHA1:
66 case KEX_DH_GRP14_SHA256:
66 kex->dh = dh_new_group14(); 67 kex->dh = dh_new_group14();
67 break; 68 break;
69 case KEX_DH_GRP16_SHA512:
70 kex->dh = dh_new_group16();
71 break;
72 case KEX_DH_GRP18_SHA512:
73 kex->dh = dh_new_group18();
74 break;
68 default: 75 default:
69 r = SSH_ERR_INVALID_ARGUMENT; 76 r = SSH_ERR_INVALID_ARGUMENT;
70 goto out; 77 goto out;
@@ -164,6 +171,7 @@ input_kex_dh(int type, u_int32_t seq, void *ctxt)
164 /* calc and verify H */ 171 /* calc and verify H */
165 hashlen = sizeof(hash); 172 hashlen = sizeof(hash);
166 if ((r = kex_dh_hash( 173 if ((r = kex_dh_hash(
174 kex->hash_alg,
167 kex->client_version_string, 175 kex->client_version_string,
168 kex->server_version_string, 176 kex->server_version_string,
169 sshbuf_ptr(kex->my), sshbuf_len(kex->my), 177 sshbuf_ptr(kex->my), sshbuf_len(kex->my),