diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/sha2.c | 8 | ||||
-rw-r--r-- | openbsd-compat/sha2.h | 8 |
2 files changed, 12 insertions, 4 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) */ | ||
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 */ |