From 11a1b341f3bc6a0afe75f9432f623026624fb720 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 19 May 2020 15:24:25 +0100 Subject: 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 (Merged from https://github.com/openssl/openssl/pull/11914) --- test/acvp_test.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test/acvp_test.c') 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; -- cgit v1.2.1