From fe75766c9c2919f649df7b3ad209df2bc5e56dd0 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Thu, 11 Feb 2021 16:57:37 +0100 Subject: Rename OSSL_ENCODER_CTX_new_by_EVP_PKEY and OSSL_DECODER_CTX_new_by_EVP_PKEY Additional renames done in encoder and decoder implementation to follow the style. Fixes #13622 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/14155) --- apps/dhparam.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'apps/dhparam.c') diff --git a/apps/dhparam.c b/apps/dhparam.c index 30fdfbbf6e..d3f96e61d2 100644 --- a/apps/dhparam.c +++ b/apps/dhparam.c @@ -254,14 +254,14 @@ int dhparam_main(int argc, char **argv) * We check that we got one of those key types afterwards. */ decoderctx - = OSSL_DECODER_CTX_new_by_EVP_PKEY(&tmppkey, - (informat == FORMAT_ASN1) + = OSSL_DECODER_CTX_new_for_pkey(&tmppkey, + (informat == FORMAT_ASN1) ? "DER" : "PEM", - NULL, - (informat == FORMAT_ASN1) + NULL, + (informat == FORMAT_ASN1) ? keytype : NULL, - OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, - NULL, NULL); + OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, + NULL, NULL); if (decoderctx != NULL && !OSSL_DECODER_from_bio(decoderctx, in) @@ -328,11 +328,11 @@ int dhparam_main(int argc, char **argv) if (!noout) { OSSL_ENCODER_CTX *ectx = - OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, - OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, - outformat == FORMAT_ASN1 - ? "DER" : "PEM", - NULL, NULL); + OSSL_ENCODER_CTX_new_for_pkey(pkey, + OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS, + outformat == FORMAT_ASN1 + ? "DER" : "PEM", + NULL, NULL); if (ectx == NULL || !OSSL_ENCODER_to_bio(ectx, out)) { OSSL_ENCODER_CTX_free(ectx); -- cgit v1.2.3