6

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?

14

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
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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