summaryrefslogtreecommitdiff
path: root/kex.c
diff options
context:
space:
mode:
authortim <tim>2006-03-16 04:17:05 +0000
committertim <tim>2006-03-16 04:17:05 +0000
commit6ad7e512d2a843af39508749f4713d83aaa5d19f (patch)
tree8b3bfb7d6e1614c02944a950d85017b0086601fa /kex.c
parent276a97570f39f8fcc94ae59b4087fabfa5aad990 (diff)
downloadopenssh-6ad7e512d2a843af39508749f4713d83aaa5d19f.tar.gz
- (tim) [kex.c myproposal.h md-sha256.c openbsd-compat/sha2.c,h] Disable
sha256 when openssl < 0.9.7. Patch from djm@. Corrections/testing by me.
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kex.c b/kex.c
index 70c2c970..8610a7da 100644
--- a/kex.c
+++ b/kex.c
@@ -44,11 +44,13 @@ RCSID("$OpenBSD: kex.c,v 1.66 2006/03/07 09:07:40 djm Exp $");
#define KEX_COOKIE_LEN 16
-#ifdef HAVE_EVP_SHA256
+#if OPENSSL_VERSION_NUMBER < 0x00907000L
+# define evp_ssh_sha256() NULL
+#elif defined(HAVE_EVP_SHA256)
# define evp_ssh_sha256 EVP_sha256
-#else /* HAVE_EVP_SHA256 */
+#else
extern const EVP_MD *evp_ssh_sha256(void);
-#endif /* HAVE_EVP_SHA256 */
+#endif
/* prototype */
static void kex_kexinit_finish(Kex *);