]> andersk Git - openssh.git/blobdiff - kex.c
- (djm) [kex.c] Slightly more clean deactivation of dhgex-sha256 on old
[openssh.git] / kex.c
diff --git a/kex.c b/kex.c
index 175613b40177d9f3ee9b4be24eeefdc7eda3ca23..23d8d292359278db7ef6c72db8c418c3721d7066 100644 (file)
--- a/kex.c
+++ b/kex.c
@@ -44,7 +44,13 @@ RCSID("$OpenBSD: kex.c,v 1.66 2006/03/07 09:07:40 djm Exp $");
 
 #define KEX_COOKIE_LEN 16
 
+#if OPENSSL_VERSION_NUMBER >= 0x00907000L
+# if defined(HAVE_EVP_SHA256)
+# define evp_ssh_sha256 EVP_sha256
+# else
 extern const EVP_MD *evp_ssh_sha256(void);
+# endif
+#endif
 
 /* prototype */
 static void kex_kexinit_finish(Kex *);
@@ -303,9 +309,11 @@ choose_kex(Kex *k, char *client, char *server)
        } else if (strcmp(k->name, KEX_DHGEX_SHA1) == 0) {
                k->kex_type = KEX_DH_GEX_SHA1;
                k->evp_md = EVP_sha1();
+#if OPENSSL_VERSION_NUMBER >= 0x00907000L
        } else if (strcmp(k->name, KEX_DHGEX_SHA256) == 0) {
                k->kex_type = KEX_DH_GEX_SHA256;
                k->evp_md = evp_ssh_sha256();
+#endif
        } else
                fatal("bad kex alg %s", k->name);
 }
This page took 3.21944 seconds and 4 git commands to generate.