From: tb Date: Sat, 2 Mar 2024 10:08:29 +0000 (+0000) Subject: Make legacy cipher methods internal X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0659516da009740b4733be4f5855b9773500f953;p=openbsd Make legacy cipher methods internal These are ASN.1 handlers for CIPHERs, still used by CMS and its predecessors. They should never have been public. ok jsing --- diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index 28f115da06c..3d8f4563893 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -1181,12 +1181,10 @@ EVP_CIPHER_CTX_set_iv EVP_CIPHER_CTX_set_key_length EVP_CIPHER_CTX_set_padding EVP_CIPHER_CTX_test_flags -EVP_CIPHER_asn1_to_param EVP_CIPHER_block_size EVP_CIPHER_do_all EVP_CIPHER_do_all_sorted EVP_CIPHER_flags -EVP_CIPHER_get_asn1_iv EVP_CIPHER_iv_length EVP_CIPHER_key_length EVP_CIPHER_meth_dup @@ -1202,8 +1200,6 @@ EVP_CIPHER_meth_set_init EVP_CIPHER_meth_set_iv_length EVP_CIPHER_meth_set_set_asn1_params EVP_CIPHER_nid -EVP_CIPHER_param_to_asn1 -EVP_CIPHER_set_asn1_iv EVP_CIPHER_type EVP_Cipher EVP_CipherFinal diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h index b810e727670..f7026e2ceab 100644 --- a/lib/libcrypto/evp/evp.h +++ b/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.128 2024/03/02 10:06:48 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.129 2024/03/02 10:08:29 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -876,14 +876,6 @@ int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); int EVP_CIPHER_type(const EVP_CIPHER *ctx); -/* calls methods */ -int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type); -int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type); - -/* These are used by EVP_CIPHER methods */ -int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); -int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type); - /* PKCS5 password based encryption */ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, int en_de); diff --git a/lib/libcrypto/evp/evp_local.h b/lib/libcrypto/evp/evp_local.h index 0e6b6bdfa2f..bce6a87a1e7 100644 --- a/lib/libcrypto/evp/evp_local.h +++ b/lib/libcrypto/evp/evp_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_local.h,v 1.17 2024/03/02 10:06:48 tb Exp $ */ +/* $OpenBSD: evp_local.h,v 1.18 2024/03/02 10:08:29 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -373,6 +373,12 @@ struct evp_aead_ctx_st { void *aead_state; }; +/* Legacy EVP_CIPHER methods used by CMS and its predecessors. */ +int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); +int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); +int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); +int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *cipher, ASN1_TYPE *type); + int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);