summaryrefslogtreecommitdiff
path: root/drivers/builtin_openssl2/crypto/ec/ec_cvt.c
diff options
context:
space:
mode:
authormrezai <mhd.rezai@gmail.com>2016-04-15 19:03:35 +0430
committermrezai <mhd.rezai@gmail.com>2016-04-15 19:03:35 +0430
commite97922f22038e9049ed4c2db5b3736dfaa0edde3 (patch)
tree37e036a343e7482a387b7acd0a88509af78a69eb /drivers/builtin_openssl2/crypto/ec/ec_cvt.c
parent880f4abda44a42532abb6f15999a90bc85f6264a (diff)
Update OpenSSL to version 1.0.2g
Diffstat (limited to 'drivers/builtin_openssl2/crypto/ec/ec_cvt.c')
-rw-r--r--drivers/builtin_openssl2/crypto/ec/ec_cvt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/builtin_openssl2/crypto/ec/ec_cvt.c b/drivers/builtin_openssl2/crypto/ec/ec_cvt.c
index 487d727407..5a832ba1cf 100644
--- a/drivers/builtin_openssl2/crypto/ec/ec_cvt.c
+++ b/drivers/builtin_openssl2/crypto/ec/ec_cvt.c
@@ -72,12 +72,20 @@
#include <openssl/err.h>
#include "ec_lcl.h"
+#ifdef OPENSSL_FIPS
+# include <openssl/fips.h>
+#endif
+
EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
const BIGNUM *b, BN_CTX *ctx)
{
const EC_METHOD *meth;
EC_GROUP *ret;
+#ifdef OPENSSL_FIPS
+ if (FIPS_mode())
+ return FIPS_ec_group_new_curve_gfp(p, a, b, ctx);
+#endif
#if defined(OPENSSL_BN_ASM_MONT)
/*
* This might appear controversial, but the fact is that generic
@@ -152,6 +160,10 @@ EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
const EC_METHOD *meth;
EC_GROUP *ret;
+# ifdef OPENSSL_FIPS
+ if (FIPS_mode())
+ return FIPS_ec_group_new_curve_gf2m(p, a, b, ctx);
+# endif
meth = EC_GF2m_simple_method();
ret = EC_GROUP_new(meth);