Tuesday, January 19, 2021

Convert crt file to pem file

Execute the following commands to convert an .crt file to a .pem file:

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


The file output.pem is now PEM encoded.