diff options
author | Tim Rice <tim@multitalents.net> | 2006-03-15 20:17:05 -0800 |
---|---|---|
committer | Tim Rice <tim@multitalents.net> | 2006-03-15 20:17:05 -0800 |
commit | 425a6886f99235e61faf8ea67c8f573f188eb2b2 (patch) | |
tree | 5351bc87a8e9cdc499b20b698cdbc8beb8d4ba59 /openbsd-compat/sha2.h | |
parent | c495301bf8cd3a05512e702af212631abab52b88 (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.h')
-rw-r--r-- | openbsd-compat/sha2.h | 8 |
1 files changed, 6 insertions, 2 deletions
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 @@ | |||
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | 43 | ||
44 | #if !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) | 44 | #include <openssl/opensslv.h> |
45 | |||
46 | #if !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \ | ||
47 | (OPENSSL_VERSION_NUMBER >= 0x00907000L) | ||
45 | 48 | ||
46 | /*** SHA-256/384/512 Various Length Definitions ***********************/ | 49 | /*** SHA-256/384/512 Various Length Definitions ***********************/ |
47 | #define SHA256_BLOCK_LENGTH 64 | 50 | #define SHA256_BLOCK_LENGTH 64 |
@@ -124,6 +127,7 @@ char *SHA512_Data(const u_int8_t *, size_t, char *) | |||
124 | __attribute__((__bounded__(__string__,1,2))) | 127 | __attribute__((__bounded__(__string__,1,2))) |
125 | __attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH))); | 128 | __attribute__((__bounded__(__minbytes__,3,SHA512_DIGEST_STRING_LENGTH))); |
126 | 129 | ||
127 | #endif /* !defined(HAVE_SHA256_UPDATE) && !defined(HAVE_EVP_SHA256) */ | 130 | #endif /* !defined(HAVE_EVP_SHA256) && !defined(HAVE_SHA256_UPDATE) && \ |
131 | (OPENSSL_VERSION_NUMBER >= 0x00907000L) */ | ||
128 | 132 | ||
129 | #endif /* _SSHSHA2_H */ | 133 | #endif /* _SSHSHA2_H */ |