openssl/crypto/pem
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
..
build.info
pem_all.c Rename OSSL_ENCODER_CTX_new_by_EVP_PKEY and OSSL_DECODER_CTX_new_by_EVP_PKEY 2021-02-17 15:26:12 +01:00
pem_err.c err: rename err_load_xxx_strings_int functions 2021-05-26 13:01:47 +10:00
pem_info.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
pem_lib.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
pem_local.h Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
pem_oth.c Update copyright year 2020-11-26 14:18:57 +00:00
pem_pk8.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
pem_pkey.c Actually use a legacy route in pem_read_bio_key_legacy() 2021-06-08 18:53:39 +01:00
pem_sign.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
pem_x509.c Following the license change, modify the boilerplates in crypto/pem/ 2018-12-06 15:09:09 +01:00
pem_xaux.c Following the license change, modify the boilerplates in crypto/pem/ 2018-12-06 15:09:09 +01:00
pvkfmt.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00