summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-05-10 18:11:55 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-05-10 18:11:55 +1000
commita75d247a18a5099c60226395354eb252c097ac86 (patch)
tree47b89ced4941c4008e811dc4e942a2f4bcbb0204 /kex.c
parent0abfb559e3f79d1f217773510d7626c3722aa3c1 (diff)
- (dtucker) [kex.c] Only include sha256 and ECC key exchange methods when the
underlying libraries support them.
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kex.c b/kex.c
index f6e683bde..6b43a6dee 100644
--- a/kex.c
+++ b/kex.c
@@ -72,8 +72,10 @@ static const struct kexalg kexalgs[] = {
72 { KEX_DH1, KEX_DH_GRP1_SHA1, 0, EVP_sha1 }, 72 { KEX_DH1, KEX_DH_GRP1_SHA1, 0, EVP_sha1 },
73 { KEX_DH14, KEX_DH_GRP14_SHA1, 0, EVP_sha1 }, 73 { KEX_DH14, KEX_DH_GRP14_SHA1, 0, EVP_sha1 },
74 { KEX_DHGEX_SHA1, KEX_DH_GEX_SHA1, 0, EVP_sha1 }, 74 { KEX_DHGEX_SHA1, KEX_DH_GEX_SHA1, 0, EVP_sha1 },
75#if OPENSSL_VERSION_NUMBER >= 0x00907000L 75#ifdef HAVE_EVP_SHA256
76 { KEX_DHGEX_SHA256, KEX_DH_GEX_SHA256, 0, EVP_sha256 }, 76 { KEX_DHGEX_SHA256, KEX_DH_GEX_SHA256, 0, EVP_sha256 },
77#endif
78#ifdef OPENSSL_HAS_ECC
77 { KEX_ECDH_SHA2_NISTP256, KEX_ECDH_SHA2, NID_X9_62_prime256v1, EVP_sha256 }, 79 { KEX_ECDH_SHA2_NISTP256, KEX_ECDH_SHA2, NID_X9_62_prime256v1, EVP_sha256 },
78 { KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1, EVP_sha384 }, 80 { KEX_ECDH_SHA2_NISTP384, KEX_ECDH_SHA2, NID_secp384r1, EVP_sha384 },
79 { KEX_ECDH_SHA2_NISTP521, KEX_ECDH_SHA2, NID_secp521r1, EVP_sha512 }, 81 { KEX_ECDH_SHA2_NISTP521, KEX_ECDH_SHA2, NID_secp521r1, EVP_sha512 },