summaryrefslogtreecommitdiff
path: root/test/acvp_test.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-05-19 15:24:25 +0100
committerMatt Caswell <matt@openssl.org>2020-06-19 10:19:31 +0100
commit11a1b341f3bc6a0afe75f9432f623026624fb720 (patch)
tree8beadffedb50c9c324a3234832bb5dd80f56ca95 /test/acvp_test.c
parent9d2d857f135abd281591ee0c2b58e01a710c3cea (diff)
downloadopenssl-new-11a1b341f3bc6a0afe75f9432f623026624fb720.tar.gz
Make EVP_PKEY_CTX_[get|set]_ec_paramgen_curve_name more generic
We rename these function to EVP_PKEY_CTX_get_group_name and EVP_PKEY_CTX_set_group_name so that they can be used for other algorithms other than EC. Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/11914)
Diffstat (limited to 'test/acvp_test.c')
-rw-r--r--test/acvp_test.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/acvp_test.c b/test/acvp_test.c
index 0e3e117133..b7db04079c 100644
--- a/test/acvp_test.c
+++ b/test/acvp_test.c
@@ -120,8 +120,7 @@ static int ecdsa_keygen_test(int id)
if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", NULL))
|| !TEST_int_gt(EVP_PKEY_keygen_init(ctx), 0)
- || !TEST_true(EVP_PKEY_CTX_set_ec_paramgen_curve_name(ctx,
- tst->curve_name))
+ || !TEST_true(EVP_PKEY_CTX_set_group_name(ctx, tst->curve_name))
|| !TEST_int_gt(EVP_PKEY_keygen(ctx, &pkey), 0)
|| !TEST_true(pkey_get_bn_bytes(pkey, OSSL_PKEY_PARAM_PRIV_KEY, &priv,
&priv_len))
@@ -156,7 +155,7 @@ static int ecdsa_create_pkey(EVP_PKEY **pkey, const char *curve_name,
if (!TEST_ptr(bld = OSSL_PARAM_BLD_new())
|| (curve_name != NULL
&& !TEST_true(OSSL_PARAM_BLD_push_utf8_string(
- bld, OSSL_PKEY_PARAM_EC_NAME, curve_name, 0) > 0))
+ bld, OSSL_PKEY_PARAM_GROUP_NAME, curve_name, 0) > 0))
|| !TEST_true(OSSL_PARAM_BLD_push_octet_string(bld,
OSSL_PKEY_PARAM_PUB_KEY,
pub, pub_len) > 0)
@@ -252,8 +251,7 @@ static int ecdsa_siggen_test(int id)
if (!TEST_ptr(ctx = EVP_PKEY_CTX_new_from_name(libctx, "EC", NULL))
|| !TEST_int_gt(EVP_PKEY_keygen_init(ctx), 0)
- || !TEST_true(EVP_PKEY_CTX_set_ec_paramgen_curve_name(ctx,
- tst->curve_name))
+ || !TEST_true(EVP_PKEY_CTX_set_group_name(ctx, tst->curve_name))
|| !TEST_int_gt(EVP_PKEY_keygen(ctx, &pkey), 0))
goto err;