1
openssl s_client -servername foo.example.com -connect foo.example.com 2>/dev/null | openssl x509 -noout -dates