diff options
author | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2018-04-03 08:20:28 +0100 |
commit | ed6ae9c1a014a08ff5db3d768f01f2e427eeb476 (patch) | |
tree | 601025e307745d351946c01ab13f419ddb6dae29 /kexdhc.c | |
parent | 62f54f20bf351468e0124f63cc2902ee40d9b0e9 (diff) | |
parent | a0349a1cc4a18967ad1dbff5389bcdf9da098814 (diff) |
Import openssh_7.7p1.orig.tar.gz
Diffstat (limited to 'kexdhc.c')
-rw-r--r-- | kexdhc.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexdhc.c,v 1.20 2017/05/30 14:23:52 markus Exp $ */ | 1 | /* $OpenBSD: kexdhc.c,v 1.22 2018/02/07 02:06:51 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -183,7 +183,7 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) | |||
183 | goto out; | 183 | goto out; |
184 | 184 | ||
185 | if ((r = sshkey_verify(server_host_key, signature, slen, hash, hashlen, | 185 | if ((r = sshkey_verify(server_host_key, signature, slen, hash, hashlen, |
186 | ssh->compat)) != 0) | 186 | kex->hostkey_alg, ssh->compat)) != 0) |
187 | goto out; | 187 | goto out; |
188 | 188 | ||
189 | /* save session id */ | 189 | /* save session id */ |
@@ -203,14 +203,12 @@ input_kex_dh(int type, u_int32_t seq, struct ssh *ssh) | |||
203 | explicit_bzero(hash, sizeof(hash)); | 203 | explicit_bzero(hash, sizeof(hash)); |
204 | DH_free(kex->dh); | 204 | DH_free(kex->dh); |
205 | kex->dh = NULL; | 205 | kex->dh = NULL; |
206 | if (dh_server_pub) | 206 | BN_clear_free(dh_server_pub); |
207 | BN_clear_free(dh_server_pub); | ||
208 | if (kbuf) { | 207 | if (kbuf) { |
209 | explicit_bzero(kbuf, klen); | 208 | explicit_bzero(kbuf, klen); |
210 | free(kbuf); | 209 | free(kbuf); |
211 | } | 210 | } |
212 | if (shared_secret) | 211 | BN_clear_free(shared_secret); |
213 | BN_clear_free(shared_secret); | ||
214 | sshkey_free(server_host_key); | 212 | sshkey_free(server_host_key); |
215 | free(server_host_key_blob); | 213 | free(server_host_key_blob); |
216 | free(signature); | 214 | free(signature); |