[EXTERNAL] How to get all certs into a .der file.

Sands, Daniel dnsands at sandia.gov
Fri May 22 09:13:21 UTC 2020

According to the documentation, cURL can use p12 files just fine.

curl --cert bob.p12:bobspassword --cert-type p12 https://some.secure.site

Or you can omit the password part and use -key mykey with your password in the mykey file, in order to hide the password from PS queries.
From: openssl-users <openssl-users-bounces at openssl.org> On Behalf Of paul h. roubekas
Sent: Thursday, May 21, 2020 4:54 PM
To: openssl-users at openssl.org
Subject: [EXTERNAL] How to get all certs into a .der file.

I am a complete newbie to this list.
I wanted to search the archive but found no such page.

I have a requirement to convert all certs in a *.p12 file to a *.der file for use in the curl command.
The first hop to a *.pem file has all the certs.
But the second hop only has one cert.  The I read the docs but found nothing that looked even close.

Hop 1
openssl pkcs12 -chain -in trust.p12 -out ww_temp.pem  -password {redacted}

Hop 2
openssl x509 -outform der -in ww_temp.pem -out ww_temp.der

The Question) How do I get all the certs in the .der file?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20200522/8f07b710/attachment-0001.html>

More information about the openssl-users mailing list