diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-02-05 13:55:50 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-02-08 16:33:43 +1000 |
commit | 2db985b7b1e20ac670d196981aa7e8f31881d2eb (patch) | |
tree | 9c2a8d81fd86e6d92f497908488abb1766f93490 /apps | |
parent | 64954e2f34b8839ca7ad1e9576a6efaf3e49e17c (diff) | |
download | openssl-2db985b7b1e20ac670d196981aa7e8f31881d2eb.tar.gz |
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)
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dhparam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dhparam.c b/apps/dhparam.c index 8242a1f1d7..cfa399e459 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -387,8 +387,8 @@ static EVP_PKEY *dsa_to_dh(EVP_PKEY *dh) ctx = EVP_PKEY_CTX_new_from_name(NULL, "DHX", NULL); if (ctx == NULL - || !EVP_PKEY_param_fromdata_init(ctx) - || !EVP_PKEY_fromdata(ctx, &pkey, params)) { + || !EVP_PKEY_fromdata_init(ctx) + || !EVP_PKEY_fromdata(ctx, &pkey, EVP_PKEY_KEY_PARAMETERS, params)) { BIO_printf(bio_err, "Error, failed to set DH parameters\n"); goto err; } |