View gist:9783472ddff97c079fb4b278b23989c9
openssl s_client -connect host:443 -servername host < /dev/null 2>/dev/null | openssl x509 -fingerprint -noout -in /dev/stdin | grep -oP "(([0-9A-Z]){2}:){19}([0-9A-Z]){2}"