My customer has sent me tso files:

An .cer file and a .p12 file.

.p12 contains the private key and a chain of certificates.

I need to know what's .cer for?

Is there any way to know if .cer is the CA certificate?

2 Answers 2


cer is simply a file extension - it formally means nothing. However, by convention, it is often used to signify an X509 certificate.

Have a look at the file with a text editor to see whether it is a Base-64 encoded file (consists of a subset of the ASCII character set) or a binary file.

If it's the former, there should be a header line such as -----BEGIN CERTIFICATE----- which signifies that this is a X509 certificate in PEM format, which can be viewed with:

openssl x509 -noout -text -in cerfile.cer

If it's the latter (a binary file), you can view it with:

openssl x509 -noout -text -inform DER -in certfile.cer

I would suggest that the .p12 file is for the client, while the .cer file is for the server in order for it to be able to verify the certificate(s) sent by the client.

  • Let me ask you again. I'd like to know which is the purpose my customer has sent me both files, instead of only p12 one. I mean, I guess this file is necessary for some reason I'm not able to figure out... For example, am I able to make a request with curl using only p12 file?
    – Jordi
    Sep 17, 2019 at 14:56

.cer is mostly the certificate file you requested for. CA certificate mostly have CA name in it like .cer . You can check the same using the command : openssl x509 -in certificate.cer -text -noout

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .