summaryrefslogtreecommitdiffstats
path: root/crypto/ec/ecp_nist.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2019-07-03 18:30:03 +0200
committerMatt Caswell <matt@openssl.org>2019-08-06 12:19:07 +0200
commita9612d6c034f47c4788c67d85651d0cd58c3faf7 (patch)
treeb3af6481b8c7a2a50b8834c3cec70841ae739f95 /crypto/ec/ecp_nist.c
parentCorrect the Extended Master Secret string for EBCDIC (diff)
downloadopenssl-a9612d6c034f47c4788c67d85651d0cd58c3faf7.tar.xz
openssl-a9612d6c034f47c4788c67d85651d0cd58c3faf7.zip
Make the EC code available from inside the FIPS provider
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com> (Merged from https://github.com/openssl/openssl/pull/9380)
Diffstat (limited to 'crypto/ec/ecp_nist.c')
-rw-r--r--crypto/ec/ecp_nist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/ec/ecp_nist.c b/crypto/ec/ecp_nist.c
index 9f9045b544..13249b52de 100644
--- a/crypto/ec/ecp_nist.c
+++ b/crypto/ec/ecp_nist.c
@@ -89,7 +89,7 @@ int ec_GFp_nist_group_set_curve(EC_GROUP *group, const BIGNUM *p,
BN_CTX *new_ctx = NULL;
if (ctx == NULL)
- if ((ctx = new_ctx = BN_CTX_new()) == NULL)
+ if ((ctx = new_ctx = BN_CTX_new_ex(group->libctx)) == NULL)
return 0;
BN_CTX_start(ctx);
@@ -128,7 +128,7 @@ int ec_GFp_nist_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a,
goto err;
}
if (!ctx)
- if ((ctx_new = ctx = BN_CTX_new()) == NULL)
+ if ((ctx_new = ctx = BN_CTX_new_ex(group->libctx)) == NULL)
goto err;
if (!BN_mul(r, a, b, ctx))
@@ -153,7 +153,7 @@ int ec_GFp_nist_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a,
goto err;
}
if (!ctx)
- if ((ctx_new = ctx = BN_CTX_new()) == NULL)
+ if ((ctx_new = ctx = BN_CTX_new_ex(group->libctx)) == NULL)
goto err;
if (!BN_sqr(r, a, ctx))