openssl/crypto/evp
Richard Levitte 4c627d8635 EVP: Fix EVP_Digest{Sign,Verify}Init() to handle no default digest
EVP_DigestSignInit() and EVP_DigestVerifyInit() would detect if there
is no default digest when using legacy (EVP_PKEY_ASN1_METHOD)
implementations.  However, it doesn't do that when provider side keys
are used.

Furthermore, because EVP_PKEY_get_default_digest_name() was used in
the portion of the code that uses the provider implementation, the
EVP_PKEY_ASN1_METHOD would be used if the key has one attached.  This
is now changed to use evp_keymgmt_util_get_deflt_digest_name()
instead.

Finally, we make sure to detect if the provider implementation
supports the digest name parameters (default or mandatory), and
returns with error if not.  This is what the legacy portion of the
code does.

Fixes #11571

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11576)
2020-04-23 10:44:37 +01:00
..
bio_b64.c Remove unneeded switch statement to fix warning 2020-02-20 18:53:50 +10:00
bio_enc.c Remove unneeded switch statement to fix warning 2020-02-20 18:53:50 +10:00
bio_md.c Remove unneeded switch statement to fix warning 2020-02-20 18:53:50 +10:00
bio_ok.c Remove unneeded switch statement to fix warning 2020-02-20 18:53:50 +10:00
build.info Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
c_allc.c
c_alld.c
cmeth_lib.c
digest.c Handle the case where there is no digest in an EVP_MD_CTX 2020-03-19 11:39:39 +00:00
e_aes_cbc_hmac_sha1.c
e_aes_cbc_hmac_sha256.c
e_aes.c
e_aria.c
e_bf.c
e_camellia.c Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
e_cast.c
e_chacha20_poly1305.c
e_des3.c
e_des.c
e_idea.c
e_null.c
e_old.c Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
e_rc2.c
e_rc4_hmac_md5.c
e_rc4.c
e_rc5.c
e_seed.c Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
e_sm4.c
e_xcbc_d.c
encode.c
evp_cnf.c
evp_enc.c
evp_err.c EVP: Downgrade keys rather than upgrade 2020-03-25 17:01:10 +01:00
evp_fetch.c Swap parameters of evp_method_id() 2020-04-20 07:30:25 +02:00
evp_key.c
evp_lib.c
evp_local.h KEYMGMT: Add functions to get param/key generation parameters 2020-04-15 11:03:59 +02:00
evp_pbe.c
evp_pkey.c Teach d2i_PrivateKey et al about libctx 2020-04-15 11:24:13 +01:00
evp_utils.c
exchange.c EVP: fetch the EVP_KEYMGMT earlier 2020-03-21 09:28:11 +01:00
kdf_lib.c
kdf_meth.c
keymgmt_lib.c EVP: add internal evp_keymgmt_util_get_deflt_digest_name() and use it 2020-04-23 10:44:37 +01:00
keymgmt_meth.c EVP: Fix calls to evp_pkey_export_to_provider() 2020-04-17 19:50:03 +10:00
legacy_blake2.c
legacy_md2.c
legacy_md4.c
legacy_md5_sha1.c
legacy_md5.c
legacy_mdc2.c
legacy_meth.h
legacy_ripemd.c
legacy_sha.c
legacy_wp.c
m_null.c
m_sigver.c EVP: Fix EVP_Digest{Sign,Verify}Init() to handle no default digest 2020-04-23 10:44:37 +01:00
mac_lib.c
mac_meth.c
names.c
p5_crpt2.c
p5_crpt.c
p_dec.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
p_enc.c Deprecate the low level RSA functions. 2020-02-20 18:58:40 +10:00
p_lib.c EVP: add internal evp_keymgmt_util_get_deflt_digest_name() and use it 2020-04-23 10:44:37 +01:00
p_open.c Use build.info, not ifdef for crypto modules 2020-04-16 13:52:22 +02:00
p_seal.c
p_sign.c
p_verify.c
pbe_scrypt.c
pkey_kdf.c Params: add argument to the _from_text calls to indicate if the param exists. 2020-02-21 13:04:25 +01:00
pkey_mac.c Put an error on the stack in the event of a fetch failure 2020-03-27 11:12:27 +00:00
pmeth_check.c EVP: Clarify the states of an EVP_PKEY 2020-03-25 17:00:39 +01:00
pmeth_fn.c EVP: Check that key methods aren't foreign when exporting 2020-03-09 10:54:01 +01:00
pmeth_gn.c EVP: Fix calls to evp_pkey_export_to_provider() 2020-04-17 19:50:03 +10:00
pmeth_lib.c pkey: free key manager on error path 2020-04-17 19:51:37 +10:00
signature.c EVP: Fix calls to evp_pkey_export_to_provider() 2020-04-17 19:50:03 +10:00