Don't attempt to enter FIPS mode in autoconfig module if already in FIPS mode.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 11 Nov 2008 12:52:14 +0000 (12:52 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 11 Nov 2008 12:52:14 +0000 (12:52 +0000)
crypto/evp/evp_cnf.c

index e9004de0ebce4103398f93ce24dd9a99788c92d7..2e4db3023593c80e38700d05bf6757d09708ea2c 100644 (file)
@@ -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;