- (djm) [sshkey.h] Fix compilation when OpenSSL lacks ECC

This commit is contained in:
Damien Miller 2014-08-20 11:06:50 +10:00
parent c5089ecaec
commit f0935698f0
2 changed files with 25 additions and 14 deletions

View File

@ -3,6 +3,7 @@
suggested by Kevin Brott suggested by Kevin Brott
- (djm) [Makefile.in] refer to libtest_helper.a by explicit path rather than - (djm) [Makefile.in] refer to libtest_helper.a by explicit path rather than
-L/-l; fixes linking problems on some platforms -L/-l; fixes linking problems on some platforms
- (djm) [sshkey.h] Fix compilation when OpenSSL lacks ECC
20140819 20140819
- (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen - (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen

View File

@ -31,13 +31,19 @@
#ifdef WITH_OPENSSL #ifdef WITH_OPENSSL
#include <openssl/rsa.h> #include <openssl/rsa.h>
#include <openssl/dsa.h> #include <openssl/dsa.h>
#include <openssl/ec.h> # ifdef OPENSSL_HAS_ECC
#else /* OPENSSL */ # include <openssl/ec.h>
#define RSA void # else /* OPENSSL_HAS_ECC */
#define DSA void # define EC_KEY void
#define EC_KEY void # define EC_GROUP void
#define EC_GROUP void # define EC_POINT void
#define EC_POINT void # endif /* OPENSSL_HAS_ECC */
#else /* WITH_OPENSSL */
# define RSA void
# define DSA void
# define EC_KEY void
# define EC_GROUP void
# define EC_POINT void
#endif /* WITH_OPENSSL */ #endif /* WITH_OPENSSL */
#define SSH_RSA_MINIMUM_MODULUS_SIZE 768 #define SSH_RSA_MINIMUM_MODULUS_SIZE 768
@ -211,12 +217,16 @@ int ssh_ed25519_verify(const struct sshkey *key,
const u_char *data, size_t datalen, u_int compat); const u_char *data, size_t datalen, u_int compat);
#endif #endif
#ifndef WITH_OPENSSL #if !defined(WITH_OPENSSL)
#undef RSA # undef RSA
#undef DSA # undef DSA
#undef EC_KEY # undef EC_KEY
#undef EC_GROUP # undef EC_GROUP
#undef EC_POINT # undef EC_POINT
#endif /* WITH_OPENSSL */ #elif !defined(OPENSSL_HAS_ECC)
# undef EC_KEY
# undef EC_GROUP
# undef EC_POINT
#endif
#endif /* SSHKEY_H */ #endif /* SSHKEY_H */