7

I'd like to convert a PEM(+key) certificate to a *.p12 file. I know this is how I do it when I don't have an intermediate certificate:

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

How do I do it when I have an intermediate certificate?

0

1 Answer 1

16

You need to concatenate all the PEM files into one, then convert it to PKCS#12:

$ cat certificate.crt intermediate.crt > bundle.crt
$ openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in bundle.crt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.