Note to self – inspect TLS certificate from the CLI

Lifting a tip from serverfault.com to inspect the TLS certificate for a server from the command line. Replace example.com with the domain to check and 443 with the appropriate port.

echo | openssl s_client -showcerts -servername example.com -connect example.com:443 2> /dev/null | openssl x509 -inform pem -noout -text

Leave a Reply

Your email address will not be published. Required fields are marked *