- (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
- (djm) [Makefile.in] refer to libtest_helper.a by explicit path rather than
-L/-l; fixes linking problems on some platforms
- (djm) [sshkey.h] Fix compilation when OpenSSL lacks ECC
20140819
- (djm) [serverloop.c] Fix syntax error on Cygwin; from Corinna Vinschen

View File

@ -31,13 +31,19 @@
#ifdef WITH_OPENSSL
#include <openssl/rsa.h>
#include <openssl/dsa.h>
#include <openssl/ec.h>
#else /* OPENSSL */
#define RSA void
#define DSA void
#define EC_KEY void
#define EC_GROUP void
#define EC_POINT void
# ifdef OPENSSL_HAS_ECC
# include <openssl/ec.h>
# else /* OPENSSL_HAS_ECC */
# define EC_KEY void
# define EC_GROUP 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 */
#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);
#endif
#ifndef WITH_OPENSSL
#undef RSA
#undef DSA
#undef EC_KEY
#undef EC_GROUP
#undef EC_POINT
#endif /* WITH_OPENSSL */
#if !defined(WITH_OPENSSL)
# undef RSA
# undef DSA
# undef EC_KEY
# undef EC_GROUP
# undef EC_POINT
#elif !defined(OPENSSL_HAS_ECC)
# undef EC_KEY
# undef EC_GROUP
# undef EC_POINT
#endif
#endif /* SSHKEY_H */