summaryrefslogtreecommitdiffstats
path: root/myproposal.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 /myproposal.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 'myproposal.h')
-rw-r--r--myproposal.h53
1 files changed, 29 insertions, 24 deletions
diff --git a/myproposal.h b/myproposal.h
index 5daca533..89319078 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -26,44 +26,49 @@
#include <openssl/opensslv.h>
+#ifdef OPENSSL_HAS_ECC
+# define KEX_ECDH_METHODS \
+ "ecdh-sha2-nistp256," \
+ "ecdh-sha2-nistp384," \
+ "ecdh-sha2-nistp521,"
+# define HOSTKEY_ECDSA_CERT_METHODS \
+ "ecdsa-sha2-nistp256-cert-v01@openssh.com," \
+ "ecdsa-sha2-nistp384-cert-v01@openssh.com," \
+ "ecdsa-sha2-nistp521-cert-v01@openssh.com,"
+# define HOSTKEY_ECDSA_METHODS \
+ "ecdsa-sha2-nistp256," \
+ "ecdsa-sha2-nistp384," \
+ "ecdsa-sha2-nistp521,"
+#else
+# define KEX_ECDH_METHODS
+# define HOSTKEY_ECDSA_CERT_METHODS
+# define HOSTKEY_ECDSA_METHODS
+#endif
+
/* Old OpenSSL doesn't support what we need for DHGEX-sha256 */
#if OPENSSL_VERSION_NUMBER < 0x00907000L
-# define KEX_DEFAULT_KEX \
- "diffie-hellman-group-exchange-sha1," \
- "diffie-hellman-group14-sha1," \
- "diffie-hellman-group1-sha1"
-
-#define KEX_DEFAULT_PK_ALG \
- "ssh-rsa-cert-v01@openssh.com," \
- "ssh-dss-cert-v01@openssh.com," \
- "ssh-rsa-cert-v00@openssh.com," \
- "ssh-dss-cert-v00@openssh.com," \
- "ssh-rsa," \
- "ssh-dss"
+# define KEX_SHA256_METHODS \
+ "diffie-hellman-group-exchange-sha1,"
#else
-# define KEX_DEFAULT_KEX \
- "ecdh-sha2-nistp256," \
- "ecdh-sha2-nistp384," \
- "ecdh-sha2-nistp521," \
- "diffie-hellman-group-exchange-sha256," \
+# define KEX_SHA256_METHODS
+#endif
+
+# define KEX_DEFAULT_KEX \
+ KEX_ECDH_METHODS \
+ KEX_SHA256_METHODS \
"diffie-hellman-group-exchange-sha1," \
"diffie-hellman-group14-sha1," \
"diffie-hellman-group1-sha1"
#define KEX_DEFAULT_PK_ALG \
- "ecdsa-sha2-nistp256-cert-v01@openssh.com," \
- "ecdsa-sha2-nistp384-cert-v01@openssh.com," \
- "ecdsa-sha2-nistp521-cert-v01@openssh.com," \
+ HOSTKEY_ECDSA_CERT_METHODS \
"ssh-rsa-cert-v01@openssh.com," \
"ssh-dss-cert-v01@openssh.com," \
"ssh-rsa-cert-v00@openssh.com," \
"ssh-dss-cert-v00@openssh.com," \
- "ecdsa-sha2-nistp256," \
- "ecdsa-sha2-nistp384," \
- "ecdsa-sha2-nistp521," \
+ HOSTKEY_ECDSA_METHODS \
"ssh-rsa," \
"ssh-dss"
-#endif
#define KEX_DEFAULT_ENCRYPT \
"aes128-ctr,aes192-ctr,aes256-ctr," \