aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2017-10-29 16:27:02 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-10-29 16:27:02 +0100
commit17c03005d8b0d49f518e11ac7bf38b986cf56019 (patch)
treea9f62ca0cc12ae7e0aa0e281a0087496ea8813de /src
parent7204d2f48556210e3e6894aebb20db24819a3e86 (diff)
downloadlibssh-17c03005d8b0d49f518e11ac7bf38b986cf56019.tar.gz
libssh-17c03005d8b0d49f518e11ac7bf38b986cf56019.tar.xz
libssh-17c03005d8b0d49f518e11ac7bf38b986cf56019.zip
ecdh: fix build for old libgcrypt
Summary: Fix a typo for old libgcrypt builds `k_length` -> `k_len`. Signed-off-by: Jon Simons <jon@jonsimons.org> Test Plan: * Spotted this last-minute typo bug in local testing. Reviewers: asn Differential Revision: https://bugs.libssh.org/D10
Diffstat (limited to 'src')
-rw-r--r--src/ecdh_gcrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ecdh_gcrypt.c b/src/ecdh_gcrypt.c
index f7430800..e4b73dc2 100644
--- a/src/ecdh_gcrypt.c
+++ b/src/ecdh_gcrypt.c
@@ -214,7 +214,7 @@ int ecdh_build_k(ssh_session session)
goto out;
}
- if (ssh_string_len(s) != k_length) {
+ if (ssh_string_len(s) != k_len) {
ssh_string_burn(s);
ssh_string_free(s);
goto out;
@@ -223,7 +223,7 @@ int ecdh_build_k(ssh_session session)
err = gcry_mpi_scan(&session->next_crypto->k,
GCRYMPI_FMT_USG,
(const char *)ssh_string_data(s) + 1,
- k_length / 2,
+ k_len / 2,
NULL);
ssh_string_burn(s);
ssh_string_free(s);