Simplify the EVP_PKEY_XXX_fromdata_XX methods.
authorShane Lontis <shane.lontis@oracle.com>
Fri, 5 Feb 2021 03:55:50 +0000 (13:55 +1000)
committerShane Lontis <shane.lontis@oracle.com>
Mon, 8 Feb 2021 06:33:43 +0000 (16:33 +1000)
commit2db985b7b1e20ac670d196981aa7e8f31881d2eb
tree9c2a8d81fd86e6d92f497908488abb1766f93490
parent64954e2f34b8839ca7ad1e9576a6efaf3e49e17c
Simplify the EVP_PKEY_XXX_fromdata_XX methods.

The existing names such as EVP_PKEY_param_fromdata_settable were a bit
confusing since the 'param' referred to key params not OSSL_PARAM. To simplify
the interface a 'selection' parameter will be passed instead. The
changes are:

(1) EVP_PKEY_fromdata_init() replaces both EVP_PKEY_key_fromdata_init() and EVP_PKEY_param_fromdata_init().
(2) EVP_PKEY_fromdata() has an additional selection parameter.
(3) EVP_PKEY_fromdata_settable() replaces EVP_PKEY_key_fromdata_settable() and EVP_PKEY_param_fromdata_settable().
    EVP_PKEY_fromdata_settable() also uses a selection parameter.

Fixes #12989

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14076)
15 files changed:
apps/dhparam.c
crypto/evp/p_lib.c
crypto/evp/pmeth_gn.c
doc/man3/EVP_PKEY_fromdata.pod
include/openssl/evp.h
providers/fips/self_test_kats.c
ssl/statem/statem_clnt.c
ssl/t1_lib.c
test/acvp_test.c
test/ectest.c
test/evp_extra_test.c
test/evp_pkey_provided_test.c
test/helpers/predefined_dhparams.c
test/sslapitest.c
util/libcrypto.num