openssl/apps
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
..
demoSRP
include 80-test_cmp_http.t: Improve the way the test server is launched and killed 2021-06-09 14:03:16 +02:00
lib 80-test_cmp_http.t: Improve the way the test server is launched and killed 2021-06-09 14:03:16 +02:00
asn1parse.c find-doc-nits: Make -c option (cmd-nits) independent of app build and execution 2021-05-18 13:02:23 +02:00
build.info CMP test server: move apps/{,lib/}cmp_mock_srv.c and apps/{,include/}cmp_mock_srv.h 2021-05-20 16:23:27 +02:00
ca-cert.srl
ca-key.pem
ca-req.pem
ca.c openssl ca: make index.txt parsing error more verbose 2021-05-24 14:36:59 +02:00
CA.pl.in DOC: Fix nits found by new check on SYNOPSIS and OPTIONS consistency 2021-05-20 16:24:43 +02:00
cert.pem
ciphers.c APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macro 2021-05-05 20:48:20 +02:00
client.pem
cmp.c Use the new ASN.1 libctx aware capabilities in CMP 2021-06-05 17:39:10 +10:00
cms.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
crl2pkcs7.c find-doc-nits: Make -c option (cmd-nits) independent of app build and execution 2021-05-18 13:02:23 +02:00
crl.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
ct_log_list.cnf
dgst.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
dhparam.c apps: remove TODOs 2021-06-02 16:30:15 +10:00
dsa512.pem
dsa1024.pem
dsa-ca.pem
dsa-pca.pem
dsa.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
dsap.pem
dsaparam.c Add warning to key/param generating apps on potential delay due to missing entropy 2021-05-25 15:16:54 +02:00
ec.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
ecparam.c apps: Fix the mismatch of SM2 keys keymgmt 2021-05-26 16:57:40 +02:00
enc.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
engine.c Update copyright year 2021-05-06 13:03:23 +01:00
errstr.c
fipsinstall.c Add fipsinstall option to run self test KATS on module load 2021-05-25 14:57:48 +10:00
gendsa.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
genpkey.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
genrsa.c Add warning to key/param generating apps on potential delay due to missing entropy 2021-05-25 15:16:54 +02:00
info.c Update copyright year 2021-05-06 13:03:23 +01:00
insta.ca.crt
kdf.c coverity: fix 1484539 resource leak 2021-05-12 11:11:53 +10:00
list.c list: update to not use XXX_get_number() calls 2021-06-02 20:45:51 +10:00
mac.c coverity: fix 1484540 resource leak 2021-05-12 11:11:53 +10:00
nseq.c Update copyright year 2021-05-06 13:03:23 +01:00
ocsp.c apps/ocsp: Allow -port 0 2021-05-29 07:47:03 +02:00
openssl-vms.cnf
openssl.c
openssl.cnf
passwd.c APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macro 2021-05-05 20:48:20 +02:00
pca-cert.srl
pca-key.pem
pca-req.pem
pkcs7.c APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macro 2021-05-05 20:48:20 +02:00
pkcs8.c Make the -inform option to be respected if possible 2021-05-06 11:43:32 +01:00
pkcs12.c APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macro 2021-05-05 20:48:20 +02:00
pkey.c apps: Cleanup useless bio_open_default() calls for key input 2021-05-21 10:00:21 +02:00
pkeyparam.c APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macro 2021-05-05 20:48:20 +02:00
pkeyutl.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
prime.c Update copyright year 2021-05-06 13:03:23 +01:00
privkey.pem
progs.pl Make apps/progs.pl not look at apps/progs.c 2021-05-19 19:04:06 +02:00
rand.c APPS: Replace 'OPT_ERR = -1, OPT_EOF = 0, OPT_HELP' by OPT_COMMON macro 2021-05-05 20:48:20 +02:00
rehash.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
req.c req: detect a bad choice of digest early 2021-06-04 18:03:25 +10:00
req.pem
rsa8192.pem
rsa.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 2021-06-09 17:00:10 +02:00
rsautl.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_client.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
s_server.c Deprecate old style BIO callback calls 2021-05-26 17:18:34 +02:00
s_time.c Use "" for include internal/xxx 2021-05-27 09:56:41 +10:00
server2.pem
server.pem
server.srl
sess_id.c Update copyright year 2021-05-06 13:03:23 +01:00
smime.c Make the -inform option to be respected if possible 2021-05-06 11:43:32 +01:00
speed.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
spkac.c Update copyright year 2021-05-06 13:03:23 +01:00
srp.c openssl srp: make index.txt parsing error more verbose 2021-05-24 14:37:00 +02:00
storeutl.c Make the -inform option to be respected if possible 2021-05-06 11:43:32 +01:00
testCA.pem
testdsa.h
testrsa.h
timeouts.h
ts.c Rename all getters to use get/get0 in name 2021-06-01 12:40:00 +02:00
tsget.in
verify.c Make the -inform option to be respected if possible 2021-05-06 11:43:32 +01:00
version.c Update copyright year 2021-05-06 13:03:23 +01:00
vms_decc_init.c
x509.c apps: remove TODOs 2021-06-02 16:30:15 +10:00