summaryrefslogtreecommitdiff
path: root/kexdhs.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexdhs.c')
-rw-r--r--kexdhs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/kexdhs.c b/kexdhs.c
index bf933e4c9..108f66427 100644
--- a/kexdhs.c
+++ b/kexdhs.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: kexdhs.c,v 1.23 2015/12/04 16:41:28 markus Exp $ */ 1/* $OpenBSD: kexdhs.c,v 1.24 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_server(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;
@@ -158,6 +165,7 @@ input_kex_dh_init(int type, u_int32_t seq, void *ctxt)
158 /* calc H */ 165 /* calc H */
159 hashlen = sizeof(hash); 166 hashlen = sizeof(hash);
160 if ((r = kex_dh_hash( 167 if ((r = kex_dh_hash(
168 kex->hash_alg,
161 kex->client_version_string, 169 kex->client_version_string,
162 kex->server_version_string, 170 kex->server_version_string,
163 sshbuf_ptr(kex->peer), sshbuf_len(kex->peer), 171 sshbuf_ptr(kex->peer), sshbuf_len(kex->peer),