diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-01-21 10:03:37 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-21 21:47:28 +1100 |
commit | dec5e9d33891e3bc3f1395d7db0e56fdc7f86dfc (patch) | |
tree | a91c7543cc726563651cc9eb2603f205ab7b27b1 /kexgex.c | |
parent | e93bd98eab79b9a78f64ee8dd4dffc4d3979c7ae (diff) |
upstream: factor out kex_dh_compute_key() - it's shared between
plain DH KEX and DH GEX in both the client and server implementations
from markus@ ok djm@
OpenBSD-Commit-ID: 12186e18791fffcd4642c82e7e0cfdd7ea37e2ec
Diffstat (limited to 'kexgex.c')
-rw-r--r-- | kexgex.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kexgex.c,v 1.30 2018/12/27 03:25:25 djm Exp $ */ | 1 | /* $OpenBSD: kexgex.c,v 1.31 2019/01/21 10:03:37 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Niels Provos. All rights reserved. | 3 | * Copyright (c) 2000 Niels Provos. All rights reserved. |
4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. | 4 | * Copyright (c) 2001 Markus Friedl. All rights reserved. |
@@ -56,7 +56,7 @@ kexgex_hash( | |||
56 | const BIGNUM *gen, | 56 | const BIGNUM *gen, |
57 | const BIGNUM *client_dh_pub, | 57 | const BIGNUM *client_dh_pub, |
58 | const BIGNUM *server_dh_pub, | 58 | const BIGNUM *server_dh_pub, |
59 | const BIGNUM *shared_secret, | 59 | const u_char *shared_secret, size_t secretlen, |
60 | u_char *hash, size_t *hashlen) | 60 | u_char *hash, size_t *hashlen) |
61 | { | 61 | { |
62 | struct sshbuf *b; | 62 | struct sshbuf *b; |
@@ -83,7 +83,7 @@ kexgex_hash( | |||
83 | (r = sshbuf_put_bignum2(b, gen)) != 0 || | 83 | (r = sshbuf_put_bignum2(b, gen)) != 0 || |
84 | (r = sshbuf_put_bignum2(b, client_dh_pub)) != 0 || | 84 | (r = sshbuf_put_bignum2(b, client_dh_pub)) != 0 || |
85 | (r = sshbuf_put_bignum2(b, server_dh_pub)) != 0 || | 85 | (r = sshbuf_put_bignum2(b, server_dh_pub)) != 0 || |
86 | (r = sshbuf_put_bignum2(b, shared_secret)) != 0) { | 86 | (r = sshbuf_put(b, shared_secret, secretlen)) != 0) { |
87 | sshbuf_free(b); | 87 | sshbuf_free(b); |
88 | return r; | 88 | return r; |
89 | } | 89 | } |