summaryrefslogtreecommitdiffstats
path: root/key.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2010-09-10 11:39:26 +1000
committerDamien Miller <djm@mindrot.org>2010-09-10 11:39:26 +1000
commit6af914a15c0c33e8b5bab5ca61919b8562ff1db9 (patch)
treeb87546d8a88a05e6fd600cbb2b8c0b132278cb10 /key.h
parent041ab7c1e7d6514ed84a539a767f79ffb356e807 (diff)
- (djm) [authfd.c authfile.c bufec.c buffer.h configure.ac kex.h kexecdh.c]
[kexecdhc.c kexecdhs.c key.c key.h myproposal.h packet.c readconf.c] [ssh-agent.c ssh-ecdsa.c ssh-keygen.c ssh.c] Disable ECDH and ECDSA on platforms that don't have the requisite OpenSSL support. ok dtucker@
Diffstat (limited to 'key.h')
-rw-r--r--key.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/key.h b/key.h
index ba1a20c0..86a1d889 100644
--- a/key.h
+++ b/key.h
@@ -29,7 +29,9 @@
#include "buffer.h"
#include <openssl/rsa.h>
#include <openssl/dsa.h>
+#ifdef OPENSSL_HAS_ECC
#include <openssl/ec.h>
+#endif
typedef struct Key Key;
enum types {
@@ -77,7 +79,11 @@ struct Key {
RSA *rsa;
DSA *dsa;
int ecdsa_nid; /* NID of curve */
+#ifdef OPENSSL_HAS_ECC
EC_KEY *ecdsa;
+#else
+ void *ecdsa;
+#endif
struct KeyCert *cert;
};
@@ -114,10 +120,12 @@ int key_curve_name_to_nid(const char *);
const char * key_curve_nid_to_name(int);
u_int key_curve_nid_to_bits(int);
int key_ecdsa_bits_to_nid(int);
+#ifdef OPENSSL_HAS_ECC
int key_ecdsa_group_to_nid(const EC_GROUP *);
const EVP_MD * key_ec_nid_to_evpmd(int nid);
int key_ec_validate_public(const EC_GROUP *, const EC_POINT *);
int key_ec_validate_private(const EC_KEY *);
+#endif
Key *key_from_blob(const u_char *, u_int);
int key_to_blob(const Key *, u_char **, u_int *);
@@ -135,7 +143,7 @@ int ssh_ecdsa_verify(const Key *, const u_char *, u_int, const u_char *, u_int)
int ssh_rsa_sign(const Key *, u_char **, u_int *, const u_char *, u_int);
int ssh_rsa_verify(const Key *, const u_char *, u_int, const u_char *, u_int);
-#if defined(DEBUG_KEXECDH) || defined(DEBUG_PK)
+#if defined(OPENSSL_HAS_ECC) && (defined(DEBUG_KEXECDH) || defined(DEBUG_PK))
void key_dump_ec_point(const EC_GROUP *, const EC_POINT *);
void key_dump_ec_key(const EC_KEY *);
#endif