]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/ecdh/ech_lib.c
Don't set default public key methods in FIPS mode so applications
[thirdparty/openssl.git] / crypto / ecdh / ech_lib.c
index 568392bdd406c380c0588123b6b02a3eb2b78484..dadbfd3c49f51769d0d0b55fd898de673c3ca5ca 100644 (file)
@@ -96,10 +96,12 @@ const ECDH_METHOD *ECDH_get_default_method(void)
                {
 #ifdef OPENSSL_FIPS
                if (FIPS_mode())
-                       default_ECDH_method = FIPS_ecdh_openssl();
+                       return FIPS_ecdh_openssl();
                else
+                       return ECDH_OpenSSL();
+#else
+               default_ECDH_method = ECDH_OpenSSL();
 #endif
-                       default_ECDH_method = ECDH_OpenSSL();
                }
        return default_ECDH_method;
        }