summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2013-11-27 17:38:21 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-11-27 17:38:21 +0100
commit7ecdc3e0d5660ae573e24fd8ff557c94bcdb9d4f (patch)
tree1e3d2c7741afddfd21db70584f6df18b7f10528a /include
parent67a080874b2757e6b27404f430f9a836ae0d9b8e (diff)
downloadlibssh-7ecdc3e0d5660ae573e24fd8ff557c94bcdb9d4f.tar.gz
libssh-7ecdc3e0d5660ae573e24fd8ff557c94bcdb9d4f.tar.xz
libssh-7ecdc3e0d5660ae573e24fd8ff557c94bcdb9d4f.zip
ecdh: Check if we have ECC support.
Diffstat (limited to 'include')
-rw-r--r--include/libssh/curve25519.h5
-rw-r--r--include/libssh/ecdh.h4
2 files changed, 7 insertions, 2 deletions
diff --git a/include/libssh/curve25519.h b/include/libssh/curve25519.h
index 35e25be0..0406b9ee 100644
--- a/include/libssh/curve25519.h
+++ b/include/libssh/curve25519.h
@@ -39,7 +39,10 @@ int crypto_scalarmult_base(unsigned char *q, const unsigned char *n);
int crypto_scalarmult(unsigned char *q, const unsigned char *n, const unsigned char *p);
#endif /* WITH_NACL */
-#define HAVE_CURVE25519
+#ifdef HAVE_ECC
+#define HAVE_CURVE25519 1
+#endif
+
typedef unsigned char ssh_curve25519_pubkey[CURVE25519_PUBKEY_SIZE];
typedef unsigned char ssh_curve25519_privkey[CURVE25519_PRIVKEY_SIZE];
diff --git a/include/libssh/ecdh.h b/include/libssh/ecdh.h
index b35b2af7..8d1e7515 100644
--- a/include/libssh/ecdh.h
+++ b/include/libssh/ecdh.h
@@ -26,7 +26,9 @@
#ifdef HAVE_LIBCRYPTO
#ifdef HAVE_OPENSSL_ECDH_H
-#define HAVE_ECDH
+#ifdef HAVE_ECC
+#define HAVE_ECDH 1
+#endif
#endif /* HAVE_OPENSSL_ECDH_H */
#endif /* HAVE_LIBCRYPTO */