< OpenSSL

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

Syntax

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

Conversion

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
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.