From de7d0ab1c83083dedcf2e492963189bc2ba71ef0 Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 29 Aug 2024 16:58:19 +0000 Subject: Remove the pkey_{,public_,param_}check() handlers This disables the EVP_PKEY_*check() API and makes it fail (more precisely indicate lack of support) on all key types. This is an intermediate step to full removal. Removal is ok beck jsing --- src/lib/libcrypto/rsa/rsa_ameth.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src/lib/libcrypto/rsa') diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index d7ce931733..eb5d599bf0 100644 --- a/src/lib/libcrypto/rsa/rsa_ameth.c +++ b/src/lib/libcrypto/rsa/rsa_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_ameth.c,v 1.59 2024/08/28 07:15:04 tb Exp $ */ +/* $OpenBSD: rsa_ameth.c,v 1.60 2024/08/29 16:58:19 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -1082,12 +1082,6 @@ rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, return 2; } -static int -rsa_pkey_check(const EVP_PKEY *pkey) -{ - return RSA_check_key(pkey->pkey.rsa); -} - #ifndef OPENSSL_NO_CMS static RSA_OAEP_PARAMS * rsa_oaep_decode(const X509_ALGOR *alg) @@ -1235,16 +1229,12 @@ const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = { .old_priv_encode = old_rsa_priv_encode, .item_verify = rsa_item_verify, .item_sign = rsa_item_sign, - - .pkey_check = rsa_pkey_check, }; const EVP_PKEY_ASN1_METHOD rsa2_asn1_meth = { .base_method = &rsa_asn1_meth, .pkey_id = EVP_PKEY_RSA2, .pkey_flags = ASN1_PKEY_ALIAS, - - .pkey_check = rsa_pkey_check, }; const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = { -- cgit v1.2.3-55-g6feb