Convert .pem to .crt and .key

Lanbo picture Lanbo · Dec 5, 2012 · Viewed 806.4k times · Source

Can anyone tell me the correct way/command to extract/convert the certificate .crt and private key .key files from a .pem file? I just read they are interchangable, but not how.

Answer

C.B. picture C.B. · Jan 23, 2013

I was able to convert pem to crt using this:

openssl x509 -outform der -in your-cert.pem -out your-cert.crt