Don't attempt to enter FIPS mode in autoconfig module if already in FIPS mode.

This commit is contained in:
Dr. Stephen Henson 2008-11-11 12:52:14 +00:00
parent 08e012bbec
commit b84e441861

@ -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;