Convert .pem to .crt and .key

certificate, private-key, ssl

Solution

I was able to convert pem to crt using this:

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

Problem

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.

Original source

Related problems