diff --git a/crypto/evp/evp_cnf.c b/crypto/evp/evp_cnf.c index e9004de0e..2e4db3023 100644 --- a/crypto/evp/evp_cnf.c +++ b/crypto/evp/evp_cnf.c @@ -97,7 +97,7 @@ static int alg_module_init(CONF_IMODULE *md, const CONF *cnf) if (m > 0) { #ifdef OPENSSL_FIPS - if (!FIPS_mode_set(1)) + if (!FIPS_mode() && !FIPS_mode_set(1)) { EVPerr(EVP_F_ALG_MODULE_INIT, EVP_R_ERROR_SETTING_FIPS_MODE); return 0;