summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-06-15 14:21:00 +0100
committerMatt Caswell <matt@openssl.org>2020-06-19 10:34:58 +0100
commit2da8d4eb2812e18cec5c8324a54a4c56b52563ed (patch)
tree83398242047d499554026412f2bd68a51fe7217b /providers
parent48e971dd9f88933a7f77f5051a8b79b9e17892a9 (diff)
Add more complete support for libctx/propq in the EC code
Renames some "new_ex" functions to "new_with_libctx" and ensures that we pass around the libctx AND the propq everywhere. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12159)
Diffstat (limited to 'providers')
-rw-r--r--providers/fips/fipsprov.c2
-rw-r--r--providers/implementations/keymgmt/ec_kmgmt.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 9efb6af1c9..4d39570464 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -194,7 +194,7 @@ static int dummy_evp_call(OPENSSL_CTX *libctx)
#ifndef OPENSSL_NO_EC
/* Do some dummy EC calls */
- key = EC_KEY_new_by_curve_name_ex(libctx, NID_X9_62_prime256v1);
+ key = EC_KEY_new_by_curve_name_with_libctx(libctx, NULL, NID_X9_62_prime256v1);
if (key == NULL)
goto err;
diff --git a/providers/implementations/keymgmt/ec_kmgmt.c b/providers/implementations/keymgmt/ec_kmgmt.c
index 0b006047d5..cd8e7f5ece 100644
--- a/providers/implementations/keymgmt/ec_kmgmt.c
+++ b/providers/implementations/keymgmt/ec_kmgmt.c
@@ -244,7 +244,7 @@ int otherparams_to_params(const EC_KEY *ec, OSSL_PARAM_BLD *tmpl,
static
void *ec_newdata(void *provctx)
{
- return EC_KEY_new_ex(PROV_LIBRARY_CONTEXT_OF(provctx));
+ return EC_KEY_new_with_libctx(PROV_LIBRARY_CONTEXT_OF(provctx), NULL);
}
static
@@ -667,7 +667,7 @@ static int ec_gen_set_group(void *genctx, int nid)
struct ec_gen_ctx *gctx = genctx;
EC_GROUP *group;
- group = EC_GROUP_new_by_curve_name_ex(gctx->libctx, nid);
+ group = EC_GROUP_new_by_curve_name_with_libctx(gctx->libctx, NULL, nid);
if (group == NULL) {
ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_CURVE);
return 0;
@@ -760,7 +760,7 @@ static void *ec_gen(void *genctx, OSSL_CALLBACK *osslcb, void *cbarg)
int ret = 1; /* Start optimistically */
if (gctx == NULL
- || (ec = EC_KEY_new_ex(gctx->libctx)) == NULL)
+ || (ec = EC_KEY_new_with_libctx(gctx->libctx, NULL)) == NULL)
return NULL;
/* We must always assign a group, no matter what */