openssl/crypto/evp
Richard Levitte adc9f73126 EVP: Clarify the states of an EVP_PKEY
EVP_PKEY is rather complex, even before provider side keys entered the
stage.
You could have untyped / unassigned keys (pk->type == EVP_PKEY_NONE),
keys that had been assigned a type but no data (pk->pkey.ptr == NULL),
and fully assigned keys (pk->type != EVP_PKEY_NONE && pk->pkey.ptr != NULL).

For provider side keys, the corresponding states weren't well defined,
and the code didn't quite account for all the possibilities.

We also guard most of the legacy fields in EVP_PKEY with FIPS_MODE, so
they don't exist at all in the FIPS module.

Most of all, code needs to adapt to the case where an EVP_PKEY's
|keymgmt| is non-NULL, but its |keydata| is NULL.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11375)
2020-03-25 17:00:39 +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 Adapt all build.info and test recipes to the new $disabled{'deprecated-x.y'} 2020-02-07 14:54:36 +01: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
e_cast.c
e_chacha20_poly1305.c
e_des3.c Deprecate the low level DES functions. 2020-01-25 09:30:59 +10:00
e_des.c Deprecate the low level DES functions. 2020-01-25 09:30:59 +10:00
e_idea.c Deprecate the low level IDEA functions. 2020-01-19 10:38:49 +10:00
e_null.c
e_old.c
e_rc2.c
e_rc4_hmac_md5.c Deprecate the low level MD5 functions. 2020-01-19 10:14:39 +10:00
e_rc4.c
e_rc5.c
e_seed.c
e_sm4.c
e_xcbc_d.c Deprecate the low level DES functions. 2020-01-25 09:30:59 +10:00
encode.c
evp_cnf.c
evp_enc.c Implement the NULL cipher in the default provider 2020-01-20 15:28:39 +00:00
evp_err.c Make sure we use the libctx when fetching a MAC 2020-03-19 11:48:44 +00:00
evp_fetch.c Refactor evp_pkey_make_provided() to do legacy to provider export 2020-02-22 01:19:54 +01:00
evp_key.c
evp_lib.c
evp_local.h CORE: Add the key object generator libcrypto<->provider interface 2020-03-12 10:43:58 +01:00
evp_pbe.c
evp_pkey.c
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: Clarify the states of an EVP_PKEY 2020-03-25 17:00:39 +01:00
keymgmt_meth.c CORE: Add the key object generator libcrypto<->provider interface 2020-03-12 10:43:58 +01:00
legacy_blake2.c
legacy_md2.c
legacy_md4.c
legacy_md5_sha1.c Deprecate the low level MD5 functions. 2020-01-19 10:14:39 +10:00
legacy_md5.c Deprecate the low level MD5 functions. 2020-01-19 10:14:39 +10:00
legacy_mdc2.c
legacy_meth.h
legacy_ripemd.c
legacy_sha.c Deprecate the low level SHA functions. 2020-01-19 10:14:39 +10:00
legacy_wp.c
m_null.c
m_sigver.c Handle mdname in legacy EVP_DigestSignInit_ex codepaths 2020-03-23 11:09:49 +00:00
mac_lib.c
mac_meth.c
names.c
p5_crpt2.c Params: change UTF8 construct calls to avoid explicit strlen(3) calls. 2020-02-06 16:22:00 +10:00
p5_crpt.c Avoid leak in error path of PKCS5_PBE_keyivgen 2020-01-22 18:29:39 +01:00
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: Clarify the states of an EVP_PKEY 2020-03-25 17:00:39 +01:00
p_open.c EVP: Adapt EVP_PKEY Seal and Open for provider keys 2020-01-25 13:16:09 +01:00
p_seal.c EVP: Adapt EVP_PKEY Seal and Open for provider keys 2020-01-25 13:16:09 +01:00
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 Fix EVP_PKEY_new_mac_key() 2020-03-25 10:56:35 +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: fetch the EVP_KEYMGMT earlier 2020-03-21 09:28:11 +01:00
pmeth_lib.c EVP: Clarify the states of an EVP_PKEY 2020-03-25 17:00:39 +01:00
signature.c EVP: fetch the EVP_KEYMGMT earlier 2020-03-21 09:28:11 +01:00