I have my localhost TSL/SSL certificate from Chrome stored to a .PEM file. Was wondering how do I use the oppenssl command to decode it into a list of human-readable fields.
Googling this only returned info on how to work with the private key.
There are online utilities for decoding a public key, but I need a method I can easily access programatically using Python. I couldn't find anyway to do this using a library, so I thought the openssl command might work.
The public key text in the .PEM file is the standard public key format that does work in the online decoding utilities.
Thank you!
12 Answers
how do I use the oppenssl command to decode it into a list of human-readable fields.
openssl x509 -in NAME.pem -text -noout
Replace 'NAME' with whatever filename your .pem file has.
2If you want to view a public key in PKCS#1 format, you can use:
openssl rsa -pubin -in <file> -text