From 4bb3377bc5ef8f9ca39c6383ce0aa7759193754b Mon Sep 17 00:00:00 2001 From: Adam Kent Date: Mon, 11 Apr 2011 18:37:12 +0300 Subject: [PATCH] Fix #ifdef check for older openssl versions Small compile fix for older versions of openssl that do not have SHA256 support and hence do not define OPENSSL_NO_SHA256. --- src/crypto/tls_openssl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index 276d650a2..490c912d7 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -716,7 +716,7 @@ void * tls_init(const struct tls_config *conf) #endif /* CONFIG_FIPS */ SSL_load_error_strings(); SSL_library_init(); -#ifndef OPENSSL_NO_SHA256 +#if (OPENSSL_VERSION_NUMBER >= 0x0090800fL) && !defined(OPENSSL_NO_SHA256) EVP_add_digest(EVP_sha256()); #endif /* OPENSSL_NO_SHA256 */ /* TODO: if /dev/urandom is available, PRNG is seeded