Convert CRT and KEY files to PEM files

Typically I only do this if I need to run a server that uses PEM’s only.

Convert CRT to PEM

openssl x509 -in SOURCE.crt -out SOURCE.crt.der -outform DER

This will make a DER file that can be removed afterwards.

openssl x509 -in SOURCE.crt.der -inform DER -out SOURCE.crt.pem -outform PEM

This will ultimately create the PEM file for you. You can safely delete SOURCE.crt.der 🙂

Convert KEY to PEM

openssl rsa -in SOURCE.key -text > SOURCE.key.pem

This will create the PEM file from your key.

Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*