1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-13 04:42:23 +03:00

Clean up usage of HAVE_ECC and HAVE_ECDH

they might be turned off and on independenty and each of them affects different
part of libssh, authentication and key exchange respectively. But only HAVE_ECC
is defined by the cmake.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
(cherry picked from commit 492f5d82b8)
This commit is contained in:
Jakub Jelen
2023-01-04 14:52:49 +01:00
committed by Andreas Schneider
parent 1bc9b20b1a
commit b2ca8b07ec
2 changed files with 4 additions and 4 deletions

View File

@@ -99,7 +99,7 @@
#define CURVE25519 "" #define CURVE25519 ""
#endif /* HAVE_CURVE25519 */ #endif /* HAVE_CURVE25519 */
#ifdef HAVE_ECDH #ifdef HAVE_ECC
#define ECDH "ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521," #define ECDH "ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,"
#define EC_HOSTKEYS "ecdsa-sha2-nistp521," \ #define EC_HOSTKEYS "ecdsa-sha2-nistp521," \
"ecdsa-sha2-nistp384," \ "ecdsa-sha2-nistp384," \
@@ -111,12 +111,12 @@
#define EC_PUBLIC_KEY_ALGORITHMS EC_FIPS_PUBLIC_KEY_ALGOS \ #define EC_PUBLIC_KEY_ALGORITHMS EC_FIPS_PUBLIC_KEY_ALGOS \
"sk-ecdsa-sha2-nistp256-cert-v01@openssh.com," "sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,"
#else #else
#define ECDH ""
#define EC_HOSTKEYS "" #define EC_HOSTKEYS ""
#define EC_SK_HOSTKEYS "" #define EC_SK_HOSTKEYS ""
#define EC_FIPS_PUBLIC_KEY_ALGOS "" #define EC_FIPS_PUBLIC_KEY_ALGOS ""
#define EC_PUBLIC_KEY_ALGORITHMS "" #define EC_PUBLIC_KEY_ALGORITHMS ""
#define ECDH "" #endif /* HAVE_ECC */
#endif /* HAVE_ECDH */
#ifdef HAVE_DSA #ifdef HAVE_DSA
#define DSA_HOSTKEYS ",ssh-dss" #define DSA_HOSTKEYS ",ssh-dss"

View File

@@ -489,7 +489,7 @@ static const char *ssh_known_host_sigs_from_hostkey_type(enum ssh_keytypes_e typ
SSH_LOG(SSH_LOG_WARN, "DSS keys are not supported by this build"); SSH_LOG(SSH_LOG_WARN, "DSS keys are not supported by this build");
break; break;
#endif #endif
#ifdef HAVE_ECDH #ifdef HAVE_ECC
case SSH_KEYTYPE_ECDSA_P256: case SSH_KEYTYPE_ECDSA_P256:
return "ecdsa-sha2-nistp256"; return "ecdsa-sha2-nistp256";
case SSH_KEYTYPE_ECDSA_P384: case SSH_KEYTYPE_ECDSA_P384: