]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix build with non-FIPS capable OpenSSL
authorJouni Malinen <j@w1.fi>
Sun, 16 Aug 2009 16:56:33 +0000 (19:56 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 16 Aug 2009 16:56:33 +0000 (19:56 +0300)
src/crypto/crypto_openssl.c

index 4287e3efd0efb1217c58ef8e26b61864235154d4..2c865f0dea96b0ec1cf2d9cdfcecb7a8ef2d4177 100644 (file)
@@ -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));