Home GnuPG
Diffusion GnuPG 5da6925a334c

sm: Add support to export ECC private keys.

Description

sm: Add support to export ECC private keys.

* sm/minip12.c [TEST]: Remove test code.  Include util.h, tlv.h. and
openpgpdefs.h.  Remove the class and tag constants and replace them by
those from tlv.h.
(builder_add_oid, builder_add_mpi): New.
(build_key_sequence): Rename to ...
(build_rsa_key_sequence): this.
(build_ecc_key_sequence): New.
(p12_build): Call RSA or ECC builder.
(p12_raw_build): Ditto.
* sm/export.c (gpgsm_p12_export): Use correct armor header for ECC.
(sexp_to_kparms): Support ECC.
* sm/t-minip12.c: New to replace the former TEST code in minip12.h.

Details

Provenance
wernerAuthored on Apr 27 2020, 4:53 PM
Parents
rG5ea878274ef5: common: Add an easy to use DER builder.
Branches
Unknown
Tags
Unknown
Tasks
T4921: Support import of PKCS#12 encoded ECC private keys.