openssl/crypto/evp
Richard Levitte 8f020c3da5 Fix EVP_Digest{Sign,Verify}Final() and EVP_Digest{Sign,Verify}() for provider only keys
For provider only keys where the initialization didn't catch, we may
end up crashing because the legacy code path didn't check that it had
support carefully enough.  This only happens if the caller didn't
check if initialization worked or not.

For the one-shot case, it's very simply handling the case where the
key has no legacy implementation an fall back to the standard
init+update+final mechanism.

While at it, EVP_DigestSignFinal() and EVP_DigestVerifyFinal() got a
slight code cleanup.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10806)
2020-01-14 14:04:34 +01:00
..
bio_b64.c
bio_enc.c
bio_md.c
bio_ok.c
build.info Add dsa signature alg to fips provider 2020-01-12 11:32:12 +10:00
c_allc.c
c_alld.c
cmeth_lib.c
digest.c Always go the legacy route if EVP_MD_CTX_FLAG_NO_INIT is set 2020-01-13 13:50:06 +00:00
e_aes_cbc_hmac_sha1.c Deprecate the low level AES functions 2020-01-06 15:09:57 +00:00
e_aes_cbc_hmac_sha256.c Deprecate the low level AES functions 2020-01-06 15:09:57 +00:00
e_aes.c Deprecate the low level AES functions 2020-01-06 15:09:57 +00:00
e_aria.c Allow specifying the tag after AAD in CCM mode (2) 2019-11-20 10:40:55 +01:00
e_bf.c Deprecate Low Level Blowfish APIs 2020-01-08 11:25:25 +00:00
e_camellia.c Deprecate Low Level Camellia APIs 2020-01-13 13:38:20 +00:00
e_cast.c Deprecate the Low Level CAST APIs 2020-01-13 13:44:27 +00:00
e_chacha20_poly1305.c
e_des3.c
e_des.c
e_idea.c
e_null.c
e_old.c Update source files for pre-3.0 deprecation 2019-11-07 11:37:25 +01:00
e_rc2.c
e_rc4_hmac_md5.c Fix undefined array OPENSSL_ia32cap_P. 2019-10-30 10:45:40 +01:00
e_rc4.c
e_rc5.c
e_seed.c
e_sm4.c
e_xcbc_d.c
encode.c
evp_cnf.c
evp_enc.c Add GCM support for EVP_CTRL_GCM_IV_GEN and EVP_CTRL_GCM_SET_IV_INV to providers 2020-01-10 11:58:27 +10:00
evp_err.c
evp_fetch.c CORE: pass the full algorithm definition to the method constructor 2019-11-29 20:42:12 +01:00
evp_key.c
evp_lib.c Cache constants for fetched EVP_cipher 2019-11-25 13:35:43 +01:00
evp_local.h CORE & EVP: Specify OP_query_operation_name() for KEYMGMT 2020-01-09 15:01:16 +01:00
evp_pbe.c
evp_pkey.c
evp_utils.c
exchange.c EVP: Adapt KEYEXCH, SIGNATURE and ASYM_CIPHER to handle key types better 2020-01-09 15:01:28 +01:00
kdf_lib.c
kdf_meth.c Final cleanup after move to leaner EVP_PKEY methods 2019-11-10 05:00:28 +01:00
keymgmt_lib.c CORE & PROV: make export of key data leaner through callback 2019-11-14 10:53:14 +01:00
keymgmt_meth.c CORE & EVP: Specify OP_query_operation_name() for KEYMGMT 2020-01-09 15:01:16 +01:00
legacy_blake2.c Cleanup legacy digest methods. 2019-12-18 14:46:01 +10:00
legacy_md2.c Deprecate the low level MD2 functions. 2020-01-12 12:02:17 +10:00
legacy_md4.c Deprecate the low level MD4 functions. 2020-01-12 12:02:17 +10:00
legacy_md5_sha1.c Cleanup legacy digest methods. 2019-12-18 14:46:01 +10:00
legacy_md5.c Cleanup legacy digest methods. 2019-12-18 14:46:01 +10:00
legacy_mdc2.c Deprecate the low level MDC2 functions. 2020-01-12 12:02:17 +10:00
legacy_meth.h Cleanup legacy digest methods. 2019-12-18 14:46:01 +10:00
legacy_ripemd.c Deprecate the low level RIPEMD160 functions. 2020-01-12 12:00:31 +10:00
legacy_sha.c Cleanup legacy digest methods. 2019-12-18 14:46:01 +10:00
legacy_wp.c Deprecate the low level Whirlpool functions. 2020-01-12 12:05:04 +10:00
m_null.c
m_sigver.c Fix EVP_Digest{Sign,Verify}Final() and EVP_Digest{Sign,Verify}() for provider only keys 2020-01-14 14:04:34 +01:00
mac_lib.c
mac_meth.c Final cleanup after move to leaner EVP_PKEY methods 2019-11-10 05:00:28 +01:00
names.c Ensure EVP_get_digestbyname() and EVP_get_cipherbyname() know all aliases 2019-11-06 10:11:31 +00:00
p5_crpt2.c
p5_crpt.c
p_dec.c
p_enc.c
p_lib.c Add dsa signature alg to fips provider 2020-01-12 11:32:12 +10:00
p_open.c
p_seal.c
p_sign.c
p_verify.c
pbe_scrypt.c
pkey_kdf.c
pkey_mac.c
pmeth_fn.c Add dsa signature alg to fips provider 2020-01-12 11:32:12 +10:00
pmeth_gn.c Add dsa signature alg to fips provider 2020-01-12 11:32:12 +10:00
pmeth_lib.c Add dsa signature alg to fips provider 2020-01-12 11:32:12 +10:00
signature.c Add dsa signature alg to fips provider 2020-01-12 11:32:12 +10:00