Remove the ability to query the internal EVP_PKEY_ASN1_METHODs

Previously there were a few functions where you could obtain a handle
on registered EVP_PKEY_ASN1_METHODs and query information about them.
We remove the capability.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29405)
This commit is contained in:
Matt Caswell
2025-12-15 16:18:13 +00:00
parent 48d311ee55
commit f9f6d5666a
19 changed files with 48 additions and 227 deletions

View File

@@ -919,4 +919,14 @@ int evp_pkey_decrypt_alloc(EVP_PKEY_CTX *ctx, unsigned char **outp,
int ossl_md2hmacnid(int mdnid);
int ossl_hmac2mdnid(int hmac_nid);
const EVP_PKEY_ASN1_METHOD *evp_pkey_asn1_find(int type);
const EVP_PKEY_ASN1_METHOD *evp_pkey_asn1_find_str(const char *str, int len);
int evp_pkey_asn1_get_count(void);
const EVP_PKEY_ASN1_METHOD *evp_pkey_asn1_get0(int idx);
int evp_pkey_asn1_get0_info(int *ppkey_id, int *ppkey_base_id,
int *ppkey_flags, const char **pinfo,
const char **ppem_str,
const EVP_PKEY_ASN1_METHOD *ameth);
const EVP_PKEY_ASN1_METHOD *evp_pkey_get0_asn1(const EVP_PKEY *pkey);
#endif /* OSSL_CRYPTO_EVP_H */

View File

@@ -1513,20 +1513,6 @@ int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num);
#define ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED 0xb
#ifndef OPENSSL_NO_DEPRECATED_3_6
OSSL_DEPRECATEDIN_3_6 int EVP_PKEY_asn1_get_count(void);
OSSL_DEPRECATEDIN_3_6 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
OSSL_DEPRECATEDIN_3_6
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
OSSL_DEPRECATEDIN_3_6
const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
const char *str, int len);
OSSL_DEPRECATEDIN_3_6
int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
int *ppkey_flags, const char **pinfo,
const char **ppem_str,
const EVP_PKEY_ASN1_METHOD *ameth);
OSSL_DEPRECATEDIN_3_6 const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey);
OSSL_DEPRECATEDIN_3_6 EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags,
const char *pem_str,
const char *info);