Convert .pem to .crt and .key

certificateprivate-keyssl

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.

Best Answer

I was able to convert pem to crt using this:

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