summaryrefslogtreecommitdiffstats
path: root/kex.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2015-01-30 23:10:17 +1100
committerDamien Miller <djm@mindrot.org>2015-02-18 22:29:32 +1100
commit773dda25e828c4c9a52f7bdce6e1e5924157beab (patch)
tree831507f35a8feb0ae984a7a13f521932a0fedb61 /kex.h
parente89c780886b23600de1e1c8d74aabd1ff61f43f0 (diff)
repair --without-openssl; broken in refactor
Diffstat (limited to 'kex.h')
-rw-r--r--kex.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/kex.h b/kex.h
index 99a7d55b..f70b81fc 100644
--- a/kex.h
+++ b/kex.h
@@ -34,6 +34,20 @@
#include "leakmalloc.h"
#endif
+#ifdef WITH_OPENSSL
+# 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 EC_KEY void
+# define EC_GROUP void
+# define EC_POINT void
+#endif /* WITH_OPENSSL */
+
#define KEX_COOKIE_LEN 16
#define KEX_DH1 "diffie-hellman-group1-sha1"
@@ -204,4 +218,10 @@ derive_ssh1_session_id(BIGNUM *, BIGNUM *, u_int8_t[8], u_int8_t[16]);
void dump_digest(char *, u_char *, int);
#endif
+#if !defined(WITH_OPENSSL) || !defined(OPENSSL_HAS_ECC)
+# undef EC_KEY
+# undef EC_GROUP
+# undef EC_POINT
+#endif
+
#endif