diff options
author | des <des@FreeBSD.org> | 2017-09-02 14:25:20 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2017-09-02 14:25:20 +0000 |
commit | ce0d6faba2a9fd27ff0fc0942a4e51f5203bb88f (patch) | |
tree | e29bf4f30ea560420ac21b41c62cc53b42547a0b /crypto/openssh/kexdh.c | |
parent | fa127d1375fbc969c65e8d8a5f9f2f8efe4e36fc (diff) | |
download | FreeBSD-src-ce0d6faba2a9fd27ff0fc0942a4e51f5203bb88f.zip FreeBSD-src-ce0d6faba2a9fd27ff0fc0942a4e51f5203bb88f.tar.gz |
MFH (r314527,r314576,r314601,r317998): Upgrade OpenSSH to 7.3p1.
Diffstat (limited to 'crypto/openssh/kexdh.c')
-rw-r--r-- | crypto/openssh/kexdh.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crypto/openssh/kexdh.c b/crypto/openssh/kexdh.c index feea669..0bf0dc1 100644 --- a/crypto/openssh/kexdh.c +++ b/crypto/openssh/kexdh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kexdh.c,v 1.25 2015/01/19 20:16:15 markus Exp $ */ +/* $OpenBSD: kexdh.c,v 1.26 2016/05/02 10:26:04 djm Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * @@ -43,6 +43,7 @@ int kex_dh_hash( + int hash_alg, const char *client_version_string, const char *server_version_string, const u_char *ckexinit, size_t ckexinitlen, @@ -56,7 +57,7 @@ kex_dh_hash( struct sshbuf *b; int r; - if (*hashlen < ssh_digest_bytes(SSH_DIGEST_SHA1)) + if (*hashlen < ssh_digest_bytes(hash_alg)) return SSH_ERR_INVALID_ARGUMENT; if ((b = sshbuf_new()) == NULL) return SSH_ERR_ALLOC_FAIL; @@ -79,12 +80,12 @@ kex_dh_hash( #ifdef DEBUG_KEX sshbuf_dump(b, stderr); #endif - if (ssh_digest_buffer(SSH_DIGEST_SHA1, b, hash, *hashlen) != 0) { + if (ssh_digest_buffer(hash_alg, b, hash, *hashlen) != 0) { sshbuf_free(b); return SSH_ERR_LIBCRYPTO_ERROR; } sshbuf_free(b); - *hashlen = ssh_digest_bytes(SSH_DIGEST_SHA1); + *hashlen = ssh_digest_bytes(hash_alg); #ifdef DEBUG_KEX dump_digest("hash", hash, *hashlen); #endif |