openssl/crypto/evp
Richard Levitte 5a25177d1b Fix error reporting in EVP_PKEY_{sign,verify,verify_recover}
For some reason, those functions (and the _init functions too) would
raise EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE when the passed
ctx is NULL, and then not check if the provider supplied the function
that would support these libcrypto functions.

This corrects the situation, and has all those libcrypto functions
raise ERR_R_PASS_NULL_PARAMETER if ctx is NULL, and then check for the
corresponding provider supplied, and only when that one is missing,
raise EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE.

Because 0 doesn't mean error for EVP_PKEY_verify(), -1 is returned when
ERR_R_PASSED_NULL_PARAMETER is raised.  This is done consistently for all
affected functions.

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23411)
2024-01-31 10:37:07 +00:00
..
asymcipher.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_b64.c Copyright year updates 2023-09-07 09:59:15 +01:00
bio_enc.c Add appropriate NULL checks in EVP_CIPHER api 2024-01-25 08:27:53 -05:00
bio_md.c
bio_ok.c Copyright year updates 2023-09-07 09:59:15 +01:00
build.info
c_allc.c Update copyright year 2022-05-03 13:34:51 +01:00
c_alld.c
cmeth_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
ctrl_params_translate.c Copyright year updates 2023-09-07 09:59:15 +01:00
dh_ctrl.c
dh_support.c
digest.c Add EVP_DigestSqueeze() API. 2023-11-10 13:27:00 +01:00
dsa_ctrl.c
e_aes_cbc_hmac_sha1.c Update copyright year 2022-05-03 13:34:51 +01:00
e_aes_cbc_hmac_sha256.c
e_aes.c Fix partial block encryption in cfb and ofb for s390x (legacy) 2024-01-12 10:34:39 +01:00
e_aria.c crypto: Fix various typos, repeated words, align some spelling to LDP. 2022-10-12 16:55:01 +11:00
e_bf.c Update copyright year 2021-06-17 13:24:59 +01:00
e_camellia.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
e_cast.c
e_chacha20_poly1305.c Copyright year updates 2023-09-28 14:23:29 +01:00
e_des3.c Fix Coverity 1201740 & 1201712: uninitialised values 2022-05-08 17:50:04 +10:00
e_des.c Fix Coverity 1201740 & 1201712: uninitialised values 2022-05-08 17:50:04 +10:00
e_idea.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
e_null.c
e_old.c
e_rc2.c
e_rc4_hmac_md5.c
e_rc4.c
e_rc5.c Address coverity 1493382 argument cannot be negative 2021-11-08 08:55:32 +10:00
e_seed.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
e_sm4.c Update copyright year 2022-05-03 13:34:51 +01:00
e_xcbc_d.c
ec_ctrl.c Copyright year updates 2023-09-07 09:59:15 +01:00
ec_support.c Update copyright year 2022-05-03 13:34:51 +01:00
encode.c
evp_cnf.c Don't try and load the config file while already loading the config file 2021-07-28 10:35:06 +10:00
evp_enc.c Fix new typos found by codespell 2023-12-29 10:12:05 +01:00
evp_err.c EVP_PKEY_get_{bits,security_bits,size}(): add missing error queue entry on failure 2023-10-26 16:03:48 +01:00
evp_fetch.c evp_fetch.c: Check meth_id instead of name_id 2024-01-11 10:18:25 +01:00
evp_key.c Add appropriate NULL checks in EVP_CIPHER api 2024-01-25 08:27:53 -05:00
evp_lib.c Add appropriate NULL checks in EVP_CIPHER api 2024-01-25 08:27:53 -05:00
evp_local.h Move discovery of the legacy alg type into the keymgmt 2024-01-15 16:37:32 +01:00
evp_pbe.c Copyright year updates 2023-09-07 09:59:15 +01:00
evp_pkey.c Copyright year updates 2023-09-07 09:59:15 +01:00
evp_rand.c rand: fix seeding from a weak entropy source 2023-10-24 11:14:11 +01:00
evp_utils.c
exchange.c Copyright year updates 2023-09-07 09:59:15 +01:00
kdf_lib.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
kdf_meth.c Copyright year updates 2023-09-07 09:59:15 +01:00
kem.c Copyright year updates 2023-09-07 09:59:15 +01:00
keymgmt_lib.c Copyright year updates 2023-09-07 09:59:15 +01:00
keymgmt_meth.c Move discovery of the legacy alg type into the keymgmt 2024-01-15 16:37:32 +01:00
legacy_blake2.c Copyright year updates 2023-09-28 14:23:29 +01:00
legacy_md2.c
legacy_md4.c
legacy_md5_sha1.c
legacy_md5.c
legacy_mdc2.c
legacy_meth.h Update copyright year 2021-06-17 13:24:59 +01:00
legacy_ripemd.c
legacy_sha.c Add EVP_DigestSqueeze() API. 2023-11-10 13:27:00 +01:00
legacy_wp.c
m_null.c
m_sigver.c Copyright year updates 2023-09-07 09:59:15 +01:00
mac_lib.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
mac_meth.c Copyright year updates 2023-09-07 09:59:15 +01:00
names.c
p5_crpt2.c Copyright year updates 2023-09-07 09:59:15 +01:00
p5_crpt.c Update copyright year 2021-06-17 13:24:59 +01:00
p_dec.c Fix possible null pointer dereference of evp_pkey_get_legacy() 2022-06-02 12:06:08 +02:00
p_enc.c Fix possible null pointer dereference of evp_pkey_get_legacy() 2022-06-02 12:06:08 +02:00
p_legacy.c
p_lib.c EVP_PKEY_get_{bits,security_bits,size}(): add missing error queue entry on failure 2023-10-26 16:03:48 +01:00
p_open.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
p_seal.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
p_sign.c Copyright year updates 2023-09-07 09:59:15 +01:00
p_verify.c Copyright year updates 2023-09-07 09:59:15 +01:00
pbe_scrypt.c
pmeth_check.c Make EVP_PKEY_check() be an alias for EVP_PKEY_pairwise_check() 2021-07-15 10:54:25 +10:00
pmeth_gn.c Copyright year updates 2023-09-28 14:23:29 +01:00
pmeth_lib.c Move discovery of the legacy alg type into the keymgmt 2024-01-15 16:37:32 +01:00
signature.c Fix error reporting in EVP_PKEY_{sign,verify,verify_recover} 2024-01-31 10:37:07 +00:00