Skip to content
Browse files

Fix use of ifdef where if should be used

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
  • Loading branch information...
axjowa committed Jul 11, 2019
1 parent 81b2548 commit f42a9b805a04deb0db5d0243f782ae5b6a9ef599
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/openssl.h
@@ -306,7 +306,7 @@ extern void _libssh2_openssl_crypto_exit(void);

#define _libssh2_dsa_free(dsactx) DSA_free(dsactx)

#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;

0 comments on commit f42a9b8

Please sign in to comment.
You can’t perform that action at this time.