Home GnuPG
Diffusion GnuPG a4e04375e84e

sm: Rework the PKCS#12 parser to support DFN issued keys.

Description

sm: Rework the PKCS#12 parser to support DFN issued keys.

* sm/minip12.c (struct p12_parse_ctx_s): New.  Use this instead of
passing several parameters to most functions.
(parse_pag_data): Factor things out to  ...
parse_shrouded_key_bag): new.
(parse_cert_bag): New.
(parse_bag_data): New.
(p12_parse): Setup the parse context.

To support newer pkcs#12 files like those issued by the DFN we need to
support another ordering of data elements. This rework reflects the
P12 data structure a bit better than our old ad-hoc hacks. Tests could
only be done with the certificate parts and not the encrypted private
keys.

Details

Provenance
wernerAuthored on Mon, Jun 20, 4:45 PM
Parents
rGbe5d06dae239: agent: Improve "Insert the card" message.
Branches
Unknown
Tags
Unknown
Tasks
T6037: Allow import of nwer DFN generated P12 files