openssl/crypto/asn1
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
..
a_bitstr.c Update copyright year 2021-04-08 13:04:41 +01:00
a_d2i_fp.c Teach more of the ASN.1 code about libctx/propq 2021-06-05 17:39:10 +10:00
a_digest.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
a_dup.c Give ASN.1 objects the ability to report their libctx/propq 2021-06-05 17:39:27 +10:00
a_gentm.c Update copyright year 2021-04-08 13:04:41 +01:00
a_i2d_fp.c Update copyright year 2021-05-20 14:22:33 +01:00
a_int.c Add more negative checks for integers passed to OPENSSL_malloc(). 2021-04-16 12:10:08 +10:00
a_mbstr.c Add more negative checks for integers passed to OPENSSL_malloc(). 2021-04-16 12:10:08 +10:00
a_object.c ASN1: Ensure that d2i_ASN1_OBJECT() frees the strings on ASN1_OBJECT reuse 2021-04-27 12:43:52 +02:00
a_octet.c
a_print.c
a_sign.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
a_strex.c check i2d_ASN1_TYPE return value 2021-05-14 10:13:53 +10:00
a_strnid.c
a_time.c crypto: raise error on malloc failure 2021-04-14 09:31:49 +10:00
a_type.c Update copyright year 2021-04-08 13:04:41 +01:00
a_utctm.c Update copyright year 2021-04-08 13:04:41 +01:00
a_utf8.c
a_verify.c Teach ASN1_item_verify_ctx() how to handle provided keys 2021-06-03 17:18:57 +01:00
ameth_lib.c Update copyright year 2021-04-22 14:38:44 +01:00
asn1_err.c err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
asn1_gen.c Update copyright year 2021-05-20 14:22:33 +01:00
asn1_item_list.c
asn1_item_list.h
asn1_lib.c asn1_lib.c: ASN1_put_object: Remove comment about "class 0". 2021-04-29 13:53:19 +02:00
asn1_local.h Teach more of the ASN.1 code about libctx/propq 2021-06-05 17:39:10 +10:00
asn1_par.c Update copyright year 2021-04-08 13:04:41 +01:00
asn_mime.c Teach more of the ASN.1 code about libctx/propq 2021-06-05 17:39:10 +10:00
asn_moid.c
asn_mstbl.c
asn_pack.c
bio_asn1.c asn.1: remove TODOs 2021-06-02 16:30:15 +10:00
bio_ndef.c
build.info
charmap.h
charmap.pl
d2i_param.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
d2i_pr.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
d2i_pu.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
evp_asn1.c Update copyright year 2021-04-08 13:04:41 +01:00
f_int.c
f_string.c
i2d_evp.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
n_pkey.c Use <> for #include openssl/xxx 2021-05-27 09:56:41 +10:00
nsseq.c
p5_pbe.c add zero strenght arguments to BN and RAND RNG calls 2021-05-29 17:17:12 +10:00
p5_pbev2.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p5_scrypt.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
p8_pkey.c
standard_methods.h Update copyright year 2021-04-08 13:04:41 +01:00
t_bitst.c
t_pkey.c
t_spki.c
tasn_dec.c Teach more of the ASN.1 code about libctx/propq 2021-06-05 17:39:10 +10:00
tasn_enc.c crypto: raise error on malloc failure 2021-04-14 09:31:49 +10:00
tasn_fre.c Update copyright year 2021-04-08 13:04:41 +01:00
tasn_new.c Teach more of the ASN.1 code about libctx/propq 2021-06-05 17:39:10 +10:00
tasn_prn.c Update copyright year 2021-04-08 13:04:41 +01:00
tasn_scn.c
tasn_typ.c
tasn_utl.c Rework and make DEBUG macros consistent. 2021-05-28 10:04:31 +02:00
tbl_standard.h
x_algor.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
x_bignum.c
x_info.c
x_int64.c Update copyright year 2021-04-08 13:04:41 +01:00
x_long.c
x_pkey.c
x_sig.c
x_spki.c
x_val.c