diff options
Diffstat (limited to 'kexc25519c.c')
-rw-r--r-- | kexc25519c.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/kexc25519c.c b/kexc25519c.c index 75e7d8c57..59b4e4cc0 100644 --- a/kexc25519c.c +++ b/kexc25519c.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexc25519c.c,v 1.10 2018/12/27 03:25:25 djm Exp $ */ | 1 | /* $OpenBSD: kexc25519c.c,v 1.11 2019/01/21 09:55:52 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
4 | * Copyright (c) 2010 Damien Miller. All rights reserved. | 4 | * Copyright (c) 2010 Damien Miller. All rights reserved. |
@@ -144,17 +144,6 @@ input_kex_c25519_reply(int type, u_int32_t seq, struct ssh *ssh) | |||
144 | kex->hostkey_alg, ssh->compat)) != 0) | 144 | kex->hostkey_alg, ssh->compat)) != 0) |
145 | goto out; | 145 | goto out; |
146 | 146 | ||
147 | /* save session id */ | ||
148 | if (kex->session_id == NULL) { | ||
149 | kex->session_id_len = hashlen; | ||
150 | kex->session_id = malloc(kex->session_id_len); | ||
151 | if (kex->session_id == NULL) { | ||
152 | r = SSH_ERR_ALLOC_FAIL; | ||
153 | goto out; | ||
154 | } | ||
155 | memcpy(kex->session_id, hash, kex->session_id_len); | ||
156 | } | ||
157 | |||
158 | if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) | 147 | if ((r = kex_derive_keys(ssh, hash, hashlen, shared_secret)) == 0) |
159 | r = kex_send_newkeys(ssh); | 148 | r = kex_send_newkeys(ssh); |
160 | out: | 149 | out: |