From b064eebb5080178de9641a0520e2f22b5846e0f3 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Fri, 26 Mar 2021 17:53:59 +0100 Subject: [PATCH] EVP_CIPHER_type: fix misleading argument name Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/14703) --- crypto/evp/evp_lib.c | 4 ++-- doc/man3/EVP_EncryptInit.pod | 2 +- include/openssl/evp.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/evp/evp_lib.c b/crypto/evp/evp_lib.c index 48bf99d1f5..31d2a7392b 100644 --- a/crypto/evp/evp_lib.c +++ b/crypto/evp/evp_lib.c @@ -267,10 +267,10 @@ int evp_cipher_set_asn1_aead_params(EVP_CIPHER_CTX *c, ASN1_TYPE *type, #endif /* !defined(FIPS_MODULE) */ /* Convert the various cipher NIDs and dummies to a proper OID NID */ -int EVP_CIPHER_type(const EVP_CIPHER *ctx) +int EVP_CIPHER_type(const EVP_CIPHER *cipher) { int nid; - nid = EVP_CIPHER_nid(ctx); + nid = EVP_CIPHER_nid(cipher); switch (nid) { diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index d2880b20f2..9090dc8ad3 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -149,7 +149,7 @@ EVP_CIPHER_do_all_provided int EVP_CIPHER_iv_length(const EVP_CIPHER *e); unsigned long EVP_CIPHER_flags(const EVP_CIPHER *e); unsigned long EVP_CIPHER_mode(const EVP_CIPHER *e); - int EVP_CIPHER_type(const EVP_CIPHER *ctx); + int EVP_CIPHER_type(const EVP_CIPHER *cipher); const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 4268f1020d..7d1823dbac 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -1396,7 +1396,7 @@ int EVP_PKEY_set1_encoded_public_key(EVP_PKEY *pkey, size_t EVP_PKEY_get1_encoded_public_key(EVP_PKEY *pkey, unsigned char **ppub); -int EVP_CIPHER_type(const EVP_CIPHER *ctx); +int EVP_CIPHER_type(const EVP_CIPHER *cipher); /* calls methods */ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type);