Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comments in a pem file

Tags:

openssl

pem

Does anyone know if there exists a way to put comments in a pem certificate such that openssl will ignore the comments while parsing the certificate.

Thanks

like image 964
Ravi Nankani Avatar asked Oct 24 '13 23:10

Ravi Nankani


People also ask

What are the contents of a pem file?

PEM (originally “Privacy Enhanced Mail”) is the most common format for X. 509 certificates, CSRs, and cryptographic keys. A PEM file is a text file containing one or more items in Base64 ASCII encoding, each with plain-text headers and footers (e.g. -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- ).

What is a .pem file used for?

Resolution. Privacy Enhanced Mail (PEM) files are concatenated certificate containers frequently used in certificate installations when multiple certificates that form a complete chain are being imported as a single file. They are a defined standard in RFCs 1421 through 1424.

Does pem file have private key?

pem contains the private encryption key. cert.

How pem file look like?

A PEM encoded file includes Base64 data. The private key is prefixed with a "-----BEGIN PRIVATE KEY-----" line and postfixed with an "-----END PRIVATE KEY-----". Certificates are prefixed with a "-----BEGIN CERTIFICATE-----" line and postfixed with an "-----END CERTIFICATE-----" line.


1 Answers

Anything outside -----BEGIN FOO----- and -----END FOO----- should be ignored by OpenSSL.

This behavior is commonly used to e.g. embed an entire human-readable detailed description of the cert in the PEM file itself, so that anyone reading it can see what it encodes without having to invoke openssl x509 ... on it.

like image 176
atomicinf Avatar answered Oct 23 '22 15:10

atomicinf