summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/kexc25519s.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-01-21 09:55:52 +0000
committerdjm <djm@openbsd.org>2019-01-21 09:55:52 +0000
commitd87bf4379f7b40f13249832056bdac78b477f74d (patch)
tree55efbbbf1a4c0664d2cb9e55e4658f7a73b0bccb /usr.bin/ssh/kexc25519s.c
parentMake sshpkt_get_bignum2() allocate the bignum it is parsing rather (diff)
downloadwireguard-openbsd-d87bf4379f7b40f13249832056bdac78b477f74d.tar.xz
wireguard-openbsd-d87bf4379f7b40f13249832056bdac78b477f74d.zip
save the derived session id in kex_derive_keys() rather than making each
kex method implementation do it. from markus@ ok djm@
Diffstat (limited to 'usr.bin/ssh/kexc25519s.c')
-rw-r--r--usr.bin/ssh/kexc25519s.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/usr.bin/ssh/kexc25519s.c b/usr.bin/ssh/kexc25519s.c
index fc4f51d6503..7d537fb711d 100644
--- a/usr.bin/ssh/kexc25519s.c
+++ b/usr.bin/ssh/kexc25519s.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kexc25519s.c,v 1.13 2019/01/19 21:43:56 djm Exp $ */
+/* $OpenBSD: kexc25519s.c,v 1.14 2019/01/21 09:55:52 djm Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
* Copyright (c) 2010 Damien Miller. All rights reserved.
@@ -119,17 +119,6 @@ input_kex_c25519_init(int type, u_int32_t seq, struct ssh *ssh)
hash, &hashlen)) < 0)
goto out;
- /* save session id := H */
- if (kex->session_id == NULL) {
- kex->session_id_len = hashlen;
- kex->session_id = malloc(kex->session_id_len);
- if (kex->session_id == NULL) {
- r = SSH_ERR_ALLOC_FAIL;
- goto out;
- }
- memcpy(kex->session_id, hash, kex->session_id_len);
- }
-
/* sign H */
if ((r = kex->sign(ssh, server_host_private, server_host_public,
&signature, &slen, hash, hashlen, kex->hostkey_alg)) < 0)