OpenSSL/PEM

PEM stands for Privacy-enhanced Electronic Mail, it's a standard for a public-key cryptography.

SyntaxEdit

A PEM key must be stored in a file, preferably .pem, beginning and ending by these linesĀ :

-----BEGIN CERTIFICATE REQUEST-----
...
-----END CERTIFICATE REQUEST-----

In Linux, we can identify the PEM certificates with the file command:

file MyCertificate.crt
MyCertificate.crt: PEM certificate request

ConversionEdit

To convert a DER certificate to a PEM one:

openssl x509 -inform DER -in /etc/apache2/ssl/MyCertificate.crt -outform PEM -out /etc/apache2/ssl/MyCertificate.pem