summaryrefslogtreecommitdiffstats
path: root/crypto/ecdh
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-06-20 19:41:13 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-06-20 19:41:13 +0000
commit3a5b97b7f124cbd5346ab0d8fe6fc1705a81a675 (patch)
tree0f027ac3ffcd69a7242023f43d5b309be2b71983 /crypto/ecdh
parent45bf825066b1929ec219b8b76321f5191e44f370 (diff)
Don't set default public key methods in FIPS mode so applications
can switch between modes.
Diffstat (limited to 'crypto/ecdh')
-rw-r--r--crypto/ecdh/ech_lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/ecdh/ech_lib.c b/crypto/ecdh/ech_lib.c
index 568392bdd4..dadbfd3c49 100644
--- a/crypto/ecdh/ech_lib.c
+++ b/crypto/ecdh/ech_lib.c
@@ -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;
}