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