]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix #ifdef check for older openssl versions
authorAdam Kent <adam@semicircular.net>
Mon, 11 Apr 2011 15:37:12 +0000 (18:37 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 11 Apr 2011 15:37:12 +0000 (18:37 +0300)
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

index 276d650a24dbed2514f87c49c31511db5fdd15a4..490c912d74d8b8b0ffab6c4ab949858a8b5a74a5 100644 (file)
@@ -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