Topic: Save a PKCS12 generated by wc_PKCS12_create ?

Hello,

So I create a PKCS12 using wc_PKCS12_create like so :

WC_PKCS12* pkcs12 = wc_PKCS12_create(PASSWORD, strlen(PASSWORD), NAME, der_key, der_key_size, der_cert, der_size, NULL, PBE_SHA1_DES3, PBE_SHA1_RC4_128, WC_PKCS12_ITT_DEFAULT, 1, 0, NULL);

[...]

wc_PKCS12_free(pkcs12);

Now I would like to save this PKCS12 in a .p12 file. How can I do using wolfcrypt ? I didn't see any function to convert a WC_PKCS12* to a DER byte array...

Thanks for the help !

Share

Re: Save a PKCS12 generated by wc_PKCS12_create ?

Hi natinusala,

Thank you for contacting wolfSSL about this issue. Could you tell us a little about the work you are doing with PKCS12 objects?

Currently wolfSSL does not have an API to wrap the PKCS12 object with ASN1 formatting as we only work with the bundles internally  and do not have a need to output to a file. If this is something you would like to see added as a feature request let me know and I'll put it on our feature request list.

Thanks!

Kaleb