How to convert .crt to .pem [duplicate]

Solution 1:

You can do this conversion with the OpenSSL library. Windows binaries can be found here.

Once you have the library installed, the command you need to issue is:

openssl x509 -in mycert.crt -out mycert.pem -outform PEM

Solution 2:

I found the OpenSSL answer given above didn't work for me, but the following did, working with a CRT file sourced from windows.

openssl x509 -inform DER -in yourdownloaded.crt -out outcert.pem -text