From ff2bce30578491578be609665da9f92502f85daf Mon Sep 17 00:00:00 2001 From: axjowa <36854886+axjowa@users.noreply.github.com> Date: Fri, 12 Jul 2019 18:55:09 +0200 Subject: [PATCH] openssl.h : Use of ifdef where if should be used (#389) File : openssl.h Notes : LIBSSH2_ECDSA and LIBSSH2_ED25519 are always defined so the #ifdef checks would never be false. This change makes it possible to build libssh2 against OpenSSL built without EC support. Change-Id: I0a2f07c2d80178314dcb7d505d1295d19cf15afd Credit : axjowa --- src/openssl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openssl.h b/src/openssl.h index 15518e0a..34ec7a64 100644 --- a/src/openssl.h +++ b/src/openssl.h @@ -306,7 +306,7 @@ extern void _libssh2_openssl_crypto_exit(void); #define _libssh2_dsa_free(dsactx) DSA_free(dsactx) -#ifdef LIBSSH2_ECDSA +#if LIBSSH2_ECDSA #define libssh2_ecdsa_ctx EC_KEY #define _libssh2_ecdsa_free(ecdsactx) EC_KEY_free(ecdsactx) #define _libssh2_ec_key EC_KEY @@ -321,7 +321,7 @@ libssh2_curve_type; #define _libssh2_ec_key void #endif /* LIBSSH2_ECDSA */ -#ifdef LIBSSH2_ED25519 +#if LIBSSH2_ED25519 typedef struct { EVP_PKEY *public_key;