Skip to content

Instantly share code, notes, and snippets.

@CHERTS
Created December 24, 2018 05:19
Show Gist options
  • Save CHERTS/086ac4244b07882ff191bdf364662f4c to your computer and use it in GitHub Desktop.
Save CHERTS/086ac4244b07882ff191bdf364662f4c to your computer and use it in GitHub Desktop.
OpenSSL get sha256 ssl fingerprint
MYSITE=torproject.org && openssl s_client -servername ${MYSITE} -connect ${MYSITE}:443 </dev/null 2>/dev/null | openssl x509 -text | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/p' | openssl x509 -fingerprint -sha256 | head -1 | cut -f2 -d'=' | sed 's,:,,g' | tr '[:upper:]' '[:lower:]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment