View TLS certs for HTTPS sites from the command line

echo | openssl s_client -showcerts -servername {domain} -connect {domain}:443 2>/dev/null | openssl x509 -inform pem -noout -text

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

keywords: curl, openssl, tls, https, ssl