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) --- providers/encoders.inc | 10 +++++----- providers/implementations/storemgmt/file_store.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'providers') diff --git a/providers/encoders.inc b/providers/encoders.inc index f2b59e0846..356e2f2f6b 100644 --- a/providers/encoders.inc +++ b/providers/encoders.inc @@ -74,16 +74,16 @@ ENCODER_TEXT("SM2", sm2, yes), * created like this: * * OSSL_ENCODER_CTX *ctx = - * OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, selection, "DER", "type-specific", - * NULL, NULL); + * OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "DER", "type-specific", + * NULL, NULL); * * To replace PEM_write_bio_{TYPE}PrivateKey(), PEM_write_bio_{TYPE}PublicKey() * and PEM_write_bio_{TYPE}Params(), use OSSL_ENCODER functions with an * OSSL_ENCODER_CTX created like this: * * OSSL_ENCODER_CTX *ctx = - * OSSL_ENCODER_CTX_new_by_EVP_PKEY(pkey, selection, "PEM", "type-specific", - * NULL, NULL); + * OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, "PEM", "type-specific", + * NULL, NULL); * * We only implement those for which there are current i2d_ and PEM_write_bio * implementations. @@ -197,7 +197,7 @@ ENCODER_w_structure("SM2", sm2, yes, pem, SubjectPublicKeyInfo), * Entries for key type specific output formats. These are exactly the * same as the type specific above, except that they use the key type * name as structure name instead of "type-specific", in the call on - * OSSL_ENCODER_CTX_new_by_EVP_PKEY(). + * OSSL_ENCODER_CTX_new_for_pkey(). */ /* The RSA encoders only support private key and public key output */ diff --git a/providers/implementations/storemgmt/file_store.c b/providers/implementations/storemgmt/file_store.c index a5edc53506..ab4b4055d9 100644 --- a/providers/implementations/storemgmt/file_store.c +++ b/providers/implementations/storemgmt/file_store.c @@ -59,7 +59,7 @@ static OSSL_FUNC_store_close_fn file_close; * internal OpenSSL functions, thereby bypassing the need for a surrounding * provider. This is ok, since this is a local decoder, not meant for * public consumption. It also uses the libcrypto internal decoder - * setup function ossl_decoder_ctx_setup_for_EVP_PKEY(), to allow the + * setup function ossl_decoder_ctx_setup_for_pkey(), to allow the * last resort decoder to be added first (and thereby be executed last). * Finally, it sets up its own construct and cleanup functions. * @@ -535,7 +535,7 @@ void file_load_cleanup(void *construct_data) static int file_setup_decoders(struct file_ctx_st *ctx) { - EVP_PKEY *dummy; /* for OSSL_DECODER_CTX_new_by_EVP_PKEY() */ + EVP_PKEY *dummy; /* for ossl_decoder_ctx_setup_for_pkey() */ OSSL_LIB_CTX *libctx = ossl_prov_ctx_get0_libctx(ctx->provctx); OSSL_DECODER *to_obj = NULL; /* Last resort decoder */ OSSL_DECODER_INSTANCE *to_obj_inst = NULL; @@ -588,9 +588,9 @@ static int file_setup_decoders(struct file_ctx_st *ctx) * Since we're setting up our own constructor, we don't need to care * more than that... */ - if (!ossl_decoder_ctx_setup_for_EVP_PKEY(ctx->_.file.decoderctx, - &dummy, NULL, - libctx, ctx->_.file.propq) + if (!ossl_decoder_ctx_setup_for_pkey(ctx->_.file.decoderctx, + &dummy, NULL, + libctx, ctx->_.file.propq) || !OSSL_DECODER_CTX_add_extra(ctx->_.file.decoderctx, libctx, ctx->_.file.propq)) { ERR_raise(ERR_LIB_PROV, ERR_R_OSSL_DECODER_LIB); -- cgit v1.2.3