summaryrefslogtreecommitdiff
path: root/openbsd-compat/sha2.c
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2006-03-15 20:17:05 -0800
committerTim Rice <tim@multitalents.net>2006-03-15 20:17:05 -0800
commit425a6886f99235e61faf8ea67c8f573f188eb2b2 (patch)
tree5351bc87a8e9cdc499b20b698cdbc8beb8d4ba59 /openbsd-compat/sha2.c
parentc495301bf8cd3a05512e702af212631abab52b88 (diff)
- (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 'openbsd-compat/sha2.c')
-rw-r--r--openbsd-compat/sha2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/openbsd-compat/sha2.c b/openbsd-compat/sha2.c
index 36ab60e62..cf8e0ad66 100644
--- a/openbsd-compat/sha2.c
+++ b/openbsd-compat/sha2.c
@@ -38,7 +38,10 @@
38 38
39#include "includes.h" 39#include "includes.h"
40 40
41#if !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) 41#include <openssl/opensslv.h>
42
43#if !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \
44 (OPENSSL_VERSION_NUMBER >= 0x00907000L)
42#include <sys/types.h> 45#include <sys/types.h>
43#include <string.h> 46#include <string.h>
44#include "sha2.h" 47#include "sha2.h"
@@ -875,4 +878,5 @@ SHA384_Final(u_int8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context)
875} 878}
876#endif 879#endif
877 880
878#endif /* !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) */ 881#endif /* !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \
882 (OPENSSL_VERSION_NUMBER >= 0x00907000L) */