From b7d2bd1219db7e12f8bde6667cb7771b0b83c2fe Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 2 Jun 2021 11:07:20 +0200 Subject: [PATCH] Deprecate EVP_CIPHER_impl_ctx_size and EVP_CIPHER_CTX_buf_noconst Fixes #15519 Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15584) --- crypto/evp/e_aria.c | 2 ++ crypto/evp/e_sm4.c | 2 ++ include/openssl/evp.h | 6 ++++++ util/libcrypto.num | 4 ++-- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/crypto/evp/e_aria.c b/crypto/evp/e_aria.c index b57661db58..f53528ea5c 100644 --- a/crypto/evp/e_aria.c +++ b/crypto/evp/e_aria.c @@ -8,6 +8,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/deprecated.h" + #include "internal/cryptlib.h" #ifndef OPENSSL_NO_ARIA # include diff --git a/crypto/evp/e_sm4.c b/crypto/evp/e_sm4.c index a3ccc49f7e..39bec569f7 100644 --- a/crypto/evp/e_sm4.c +++ b/crypto/evp/e_sm4.c @@ -9,6 +9,8 @@ * https://www.openssl.org/source/license.html */ +#include "internal/deprecated.h" + #include "internal/cryptlib.h" #ifndef OPENSSL_NO_SM4 # include diff --git a/include/openssl/evp.h b/include/openssl/evp.h index c4338dae9c..50cf8eeb77 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -586,7 +586,10 @@ int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher, const OSSL_PROVIDER *EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher); int EVP_CIPHER_get_block_size(const EVP_CIPHER *cipher); # define EVP_CIPHER_block_size EVP_CIPHER_get_block_size +# ifndef OPENSSL_NO_DEPRECATED_3_0 +OSSL_DEPRECATEDIN_3_0 int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *cipher); +# endif int EVP_CIPHER_get_key_length(const EVP_CIPHER *cipher); # define EVP_CIPHER_key_length EVP_CIPHER_get_key_length int EVP_CIPHER_get_iv_length(const EVP_CIPHER *cipher); @@ -624,7 +627,10 @@ OSSL_DEPRECATEDIN_3_0 unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *c # endif int EVP_CIPHER_CTX_get_updated_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len); int EVP_CIPHER_CTX_get_original_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len); +# ifndef OPENSSL_NO_DEPRECATED_3_0 +OSSL_DEPRECATEDIN_3_0 unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); +# endif int EVP_CIPHER_CTX_get_num(const EVP_CIPHER_CTX *ctx); # define EVP_CIPHER_CTX_num EVP_CIPHER_CTX_get_num int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num); diff --git a/util/libcrypto.num b/util/libcrypto.num index a66a379038..6f763f1063 100644 --- a/util/libcrypto.num +++ b/util/libcrypto.num @@ -119,7 +119,7 @@ EVP_BytesToKey 120 3_0_0 EXIST::FUNCTION: ENGINE_set_default_pkey_asn1_meths 121 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0,ENGINE OCSP_BASICRESP_add1_ext_i2d 122 3_0_0 EXIST::FUNCTION:OCSP EVP_camellia_128_ctr 123 3_0_0 EXIST::FUNCTION:CAMELLIA -EVP_CIPHER_impl_ctx_size 124 3_0_0 EXIST::FUNCTION: +EVP_CIPHER_impl_ctx_size 124 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0 X509_CRL_get_nextUpdate 125 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_1_1_0 PKCS12_free 126 3_0_0 EXIST::FUNCTION: CMS_signed_get_attr 127 3_0_0 EXIST::FUNCTION:CMS @@ -1217,7 +1217,7 @@ DSO_METHOD_openssl 1244 3_0_0 EXIST::FUNCTION: d2i_PrivateKey_fp 1245 3_0_0 EXIST::FUNCTION:STDIO i2d_NETSCAPE_CERT_SEQUENCE 1246 3_0_0 EXIST::FUNCTION: EC_POINT_oct2point 1248 3_0_0 EXIST::FUNCTION:EC -EVP_CIPHER_CTX_buf_noconst 1249 3_0_0 EXIST::FUNCTION: +EVP_CIPHER_CTX_buf_noconst 1249 3_0_0 EXIST::FUNCTION:DEPRECATEDIN_3_0 OPENSSL_DIR_read 1250 3_0_0 EXIST::FUNCTION: CMS_add_smimecap 1251 3_0_0 EXIST::FUNCTION:CMS X509_check_email 1252 3_0_0 EXIST::FUNCTION: -- 2.34.1