View an SSL certificate from the command line
I recently had some trouble with verifying an SSL in PHP on a client's server that I couldn't reproduce anywhere else. It eventually turned out that the client's IT department was presenting a different SSL certificate to the one served by the website. To help me diagnose this, I used this command line script to display the SSL certificate: getcert.sh #!/bin/bash echo | openssl s_client -showcerts -servername !$ -connect $1:443 2>/dev/null \ | openssl x509… continue reading.