OpenSSL/PEM
< OpenSSL
PEM stands for Privacy-enhanced Electronic Mail, it's a standard for a public-key cryptography.
Syntax
editA 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
Conversion
editTo 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