From 2c03f3bd0b7a077ea9a0e14abed2cc6c940e396c Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Sun, 23 Oct 2022 19:42:16 +0200 Subject: [PATCH] libcrypto.c: Change function parameter name "new" is a c++ keyword which will make the build fail. Signed-off-by: Norbert Pocs Reviewed-by: Jakub Jelen (cherry picked from commit 23cebfadea156aea377462eaf5971955c77d2d61) --- include/libssh/wrapper.h | 6 +++--- src/libcrypto.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/libssh/wrapper.h b/include/libssh/wrapper.h index 9fef1d29..36589cff 100644 --- a/include/libssh/wrapper.h +++ b/include/libssh/wrapper.h @@ -126,9 +126,9 @@ const char *ssh_hmac_type_to_string(enum ssh_hmac_e hmac_type, bool etm); #if defined(HAVE_LIBCRYPTO) && OPENSSL_VERSION_NUMBER >= 0x30000000L int evp_build_pkey(const char* name, OSSL_PARAM_BLD *param_bld, EVP_PKEY **pkey, int selection); -int evp_dup_dsa_pkey(const ssh_key key, ssh_key new, int demote); -int evp_dup_rsa_pkey(const ssh_key key, ssh_key new, int demote); -int evp_dup_ecdsa_pkey(const ssh_key key, ssh_key new, int demote); +int evp_dup_dsa_pkey(const ssh_key key, ssh_key new_key, int demote); +int evp_dup_rsa_pkey(const ssh_key key, ssh_key new_key, int demote); +int evp_dup_ecdsa_pkey(const ssh_key key, ssh_key new_key, int demote); #endif /* HAVE_LIBCRYPTO && OPENSSL_VERSION_NUMBER */ #ifdef __cplusplus diff --git a/src/libcrypto.c b/src/libcrypto.c index f563099d..ebdca6e0 100644 --- a/src/libcrypto.c +++ b/src/libcrypto.c @@ -1573,19 +1573,19 @@ static int evp_dup_pkey(const char* name, const ssh_key key, int demote, return SSH_OK; } -int evp_dup_dsa_pkey(const ssh_key key, ssh_key new, int demote) +int evp_dup_dsa_pkey(const ssh_key key, ssh_key new_key, int demote) { - return evp_dup_pkey("DSA", key, demote, new); + return evp_dup_pkey("DSA", key, demote, new_key); } -int evp_dup_rsa_pkey(const ssh_key key, ssh_key new, int demote) +int evp_dup_rsa_pkey(const ssh_key key, ssh_key new_key, int demote) { - return evp_dup_pkey("RSA", key, demote, new); + return evp_dup_pkey("RSA", key, demote, new_key); } -int evp_dup_ecdsa_pkey(const ssh_key key, ssh_key new, int demote) +int evp_dup_ecdsa_pkey(const ssh_key key, ssh_key new_key, int demote) { - return evp_dup_pkey("EC", key, demote, new); + return evp_dup_pkey("EC", key, demote, new_key); } #endif /* OPENSSL_VERSION_NUMBER */