.pem file has two certificates, what does it mean

Viewed 2868

I have a .pem file which has two certificates

-----BEGIN CERTIFICATE-----
certificate1Data
-----END CERTIFICATE-----

-----BEGIN CERTIFICATE-----
certificate2Data
-----END CERTIFICATE-----

From my knowledge the .pem file can have only 1 certificate, why would it have 2?

1 Answers

As defined in RFC 1422 a *.PEM file by definition can contain multiple items, in fact it can often contain an entire certificate chain including public key, private key, and root certificate.

The best way to find out exactly what your specific PEM file contains is to open it up in a Certificate Management utility like KeyStore Explorer. Once opened in KeyStore Explorer you can right click on the cert, and choose 'View Details' -> 'Certificate Chain Details' to see all certs in the chain.

I would suggest the most likely answer is your PEM file contains the Public (main Certificate) and the Intermediate Cert from the SSL issuer, as this is the most commonly required scenario for proper SSL configuration when hosting public web sites.

Related