Search code examples
sslcertificateprivate-key

Convert .pem to .crt and .key


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.


Solution

  • I was able to convert pem to crt using this:

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