From 1d5ed36e7c321c008528ae31f867bbe06044dfa2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 16 Aug 2009 19:56:33 +0300 Subject: [PATCH] Fix build with non-FIPS capable OpenSSL --- src/crypto/crypto_openssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crypto/crypto_openssl.c b/src/crypto/crypto_openssl.c index 4287e3efd..2c865f0de 100644 --- a/src/crypto/crypto_openssl.c +++ b/src/crypto/crypto_openssl.c @@ -40,8 +40,12 @@ int openssl_digest_vector(const EVP_MD *type, int non_fips, size_t num_elem, unsigned int mac_len; EVP_MD_CTX_init(&ctx); +#ifdef CONFIG_FIPS +#ifdef OPENSSL_FIPS if (non_fips) EVP_MD_CTX_set_flags(&ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); +#endif /* OPENSSL_FIPS */ +#endif /* CONFIG_FIPS */ if (!EVP_DigestInit_ex(&ctx, type, NULL)) { wpa_printf(MSG_ERROR, "OpenSSL: EVP_DigestInit_ex failed: %s", ERR_error_string(ERR_get_error(), NULL));