openssl/crypto/evp
Richard Levitte 6a2b8ff392 Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8
This has us switch from the 'structure' "pkcs8" to "PrivateKeyInfo",
which is sensible considering we already have "SubjectPublicKeyInfo".
We also add "EncryptedPrivateKeyInfo", and use it for a special decoder
that detects and decrypts an EncryptedPrivateKeyInfo structured DER
blob into a PrivateKeyInfo structured DER blob and passes that on to
the next decoder implementation.

The result of this change is that PKCS#8 decryption should only happen
once per decoding instead of once for every expected key type.
Furthermore, this new decoder implementation sets the data type to the
OID of the algorithmIdentifier field, thus reducing how many decoder
implementations are tentativaly run further down the call chain.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15498)
2021-06-09 17:00:10 +02:00
..
asymcipher.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00
bio_b64.c evp: remove TODOs 2021-06-02 16:30:15 +10:00
bio_enc.c evp: remove TODOs 2021-06-02 16:30:15 +10:00
bio_md.c evp: remove TODOs 2021-06-02 16:30:15 +10:00
bio_ok.c bio: improve error checking fixing coverity 1485659 & 1485665 2021-06-08 19:32:17 +10:00
build.info Remove unused code from the fips module 2021-05-08 20:44:41 +10:00
c_allc.c
c_alld.c
cmeth_lib.c Update copyright year 2021-04-22 14:38:44 +01:00
ctrl_params_translate.c evp: fix Coverity 1485669 improper use of negative value 2021-06-08 19:32:25 +10:00
dh_ctrl.c todo: remove TODO(3.0) from the sources. 2021-05-20 09:00:22 +01:00
dh_support.c Fixes related to separation of DH and DHX types 2021-04-26 19:52:11 +02:00
digest.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
dsa_ctrl.c todo: remove TODO(3.0) from the sources. 2021-05-20 09:00:22 +01:00
e_aes_cbc_hmac_sha1.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_aes_cbc_hmac_sha256.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_aes.c evp: fix coverity 1485666 argument cannot be negative 2021-06-08 19:32:17 +10:00
e_aria.c evp: fix improper use of negative value issues 2021-06-08 19:32:17 +10:00
e_bf.c evp: fix Coverity 1485668 argument cannot be negative 2021-06-08 19:32:17 +10:00
e_camellia.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_cast.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_chacha20_poly1305.c Update copyright year 2021-04-22 14:38:44 +01:00
e_des3.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_des.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_idea.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_null.c Update copyright year 2021-04-22 14:38:44 +01:00
e_old.c
e_rc2.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_rc4_hmac_md5.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_rc4.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_rc5.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
e_seed.c
e_sm4.c evp: fix improper use of negative value issues 2021-06-08 19:32:17 +10:00
e_xcbc_d.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
ec_ctrl.c todo: remove TODO(3.0) from the sources. 2021-05-20 09:00:22 +01:00
ec_support.c Add convenience functions and macros for asymmetric key generation 2021-05-11 12:46:42 +02:00
encode.c
evp_cnf.c Add NCONF_get0_libctx() 2021-06-02 12:40:02 +10:00
evp_enc.c evp: avoid some calls to EVP_CIPHER_CTX_get_iv_length() because it's been called already 2021-06-08 19:32:25 +10:00
evp_err.c err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
evp_fetch.c coverity 1484912: Null pointer dereferences (NULL_RETURNS) 2021-05-27 20:29:24 +10:00
evp_key.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
evp_lib.c Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag 2021-06-08 15:16:06 +10:00
evp_local.h Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
evp_pbe.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
evp_pkey.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
evp_rand.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00
evp_utils.c Rename the field 'provctx and data' to 'algctx' inside some objects containing 2021-05-24 10:12:18 +10:00
exchange.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00
kdf_lib.c Fix errors found by parfait static analyser. 2021-06-03 16:15:41 +10:00
kdf_meth.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
kem.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00
keymgmt_lib.c keymgmt: better detect when a key manager can be reused 2021-06-09 17:37:44 +10:00
keymgmt_meth.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00
legacy_blake2.c Add "origin" field to EVP_CIPHER, EVP_MD 2021-04-18 10:03:07 +02:00
legacy_md2.c Update copyright year 2021-04-22 14:38:44 +01:00
legacy_md4.c Update copyright year 2021-04-22 14:38:44 +01:00
legacy_md5_sha1.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
legacy_md5.c Update copyright year 2021-04-22 14:38:44 +01:00
legacy_mdc2.c Update copyright year 2021-04-22 14:38:44 +01:00
legacy_meth.h Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
legacy_ripemd.c Update copyright year 2021-04-22 14:38:44 +01:00
legacy_sha.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
legacy_wp.c Update copyright year 2021-04-22 14:38:44 +01:00
m_null.c Update copyright year 2021-04-22 14:38:44 +01:00
m_sigver.c evp: remove TODOs 2021-06-02 16:30:15 +10:00
mac_lib.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00
mac_meth.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
names.c
p5_crpt2.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p5_crpt.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_dec.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_enc.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_legacy.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_lib.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_open.c
p_seal.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_sign.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p_verify.c Update copyright year 2021-04-22 14:38:44 +01:00
pbe_scrypt.c Add library context and property query support into the PKCS12 API 2021-04-30 09:15:50 +10:00
pmeth_check.c
pmeth_gn.c evp: remove TODOs 2021-06-02 16:30:15 +10:00
pmeth_lib.c evp: remove TODOs 2021-06-02 16:30:15 +10:00
signature.c libcrypto: make XXX_get_number() internal 2021-06-02 20:45:39 +10:00