diff options
author | tb <> | 2024-08-29 16:58:19 +0000 |
---|---|---|
committer | tb <> | 2024-08-29 16:58:19 +0000 |
commit | de7d0ab1c83083dedcf2e492963189bc2ba71ef0 (patch) | |
tree | ac80a4e15f4c62b0c198aacafcfe36bca5b92794 /src/lib/libcrypto/rsa | |
parent | dabf625eeca30be23d1bdf73a58eb6f7fd1bed35 (diff) | |
download | openbsd-de7d0ab1c83083dedcf2e492963189bc2ba71ef0.tar.gz openbsd-de7d0ab1c83083dedcf2e492963189bc2ba71ef0.tar.bz2 openbsd-de7d0ab1c83083dedcf2e492963189bc2ba71ef0.zip |
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
Diffstat (limited to 'src/lib/libcrypto/rsa')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 12 |
1 files changed, 1 insertions, 11 deletions
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 @@ | |||
1 | /* $OpenBSD: rsa_ameth.c,v 1.59 2024/08/28 07:15:04 tb Exp $ */ | 1 | /* $OpenBSD: rsa_ameth.c,v 1.60 2024/08/29 16:58:19 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -1082,12 +1082,6 @@ rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, | |||
1082 | return 2; | 1082 | return 2; |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | static int | ||
1086 | rsa_pkey_check(const EVP_PKEY *pkey) | ||
1087 | { | ||
1088 | return RSA_check_key(pkey->pkey.rsa); | ||
1089 | } | ||
1090 | |||
1091 | #ifndef OPENSSL_NO_CMS | 1085 | #ifndef OPENSSL_NO_CMS |
1092 | static RSA_OAEP_PARAMS * | 1086 | static RSA_OAEP_PARAMS * |
1093 | rsa_oaep_decode(const X509_ALGOR *alg) | 1087 | rsa_oaep_decode(const X509_ALGOR *alg) |
@@ -1235,16 +1229,12 @@ const EVP_PKEY_ASN1_METHOD rsa_asn1_meth = { | |||
1235 | .old_priv_encode = old_rsa_priv_encode, | 1229 | .old_priv_encode = old_rsa_priv_encode, |
1236 | .item_verify = rsa_item_verify, | 1230 | .item_verify = rsa_item_verify, |
1237 | .item_sign = rsa_item_sign, | 1231 | .item_sign = rsa_item_sign, |
1238 | |||
1239 | .pkey_check = rsa_pkey_check, | ||
1240 | }; | 1232 | }; |
1241 | 1233 | ||
1242 | const EVP_PKEY_ASN1_METHOD rsa2_asn1_meth = { | 1234 | const EVP_PKEY_ASN1_METHOD rsa2_asn1_meth = { |
1243 | .base_method = &rsa_asn1_meth, | 1235 | .base_method = &rsa_asn1_meth, |
1244 | .pkey_id = EVP_PKEY_RSA2, | 1236 | .pkey_id = EVP_PKEY_RSA2, |
1245 | .pkey_flags = ASN1_PKEY_ALIAS, | 1237 | .pkey_flags = ASN1_PKEY_ALIAS, |
1246 | |||
1247 | .pkey_check = rsa_pkey_check, | ||
1248 | }; | 1238 | }; |
1249 | 1239 | ||
1250 | const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = { | 1240 | const EVP_PKEY_ASN1_METHOD rsa_pss_asn1_meth = { |