AbstractBrain Answers About us

How to view a certificate from command line with OpenSSL

Question

How can I view a certificate with OpenSSL?

I would like to see the content of a certificate in PEM format. In particular I would like to see details like Issuer, Common name, Date, etc.

Can I do that from command line?

Can I use OpenSSL?

Answer

You can simply use this command to view the content / details of a certificate:

$ openssl x509 -in cert.pem -text