From 425a6886f99235e61faf8ea67c8f573f188eb2b2 Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Wed, 15 Mar 2006 20:17:05 -0800 Subject: - (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. --- openbsd-compat/sha2.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'openbsd-compat/sha2.h') diff --git a/openbsd-compat/sha2.h b/openbsd-compat/sha2.h index 1d6aa61e9..821f2dd6c 100644 --- a/openbsd-compat/sha2.h +++ b/openbsd-compat/sha2.h @@ -41,7 +41,10 @@ #include "includes.h" -#if !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) +#include + +#if !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \ + (OPENSSL_VERSION_NUMBER >= 0x00907000L) /*** SHA-256/384/512 Various Length Definitions ***********************/ #define SHA256_BLOCK_LENGTH 64 @@ -124,6 +127,7 @@ char *SHA512_Data(const u_int8_t *, size_t, char *) __attribute__((__bounded__(__string__,1,2))) __attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH))); -#endif /* !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) */ +#endif /* !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \ + (OPENSSL_VERSION_NUMBER >= 0x00907000L) */ #endif /* _SSHSHA2_H */ -- cgit v1.2.3