Skip to content

Instantly share code, notes, and snippets.

@danielbene
Last active October 15, 2021 14:13
Show Gist options
  • Save danielbene/9fc89275106653c7454719a2fba922fe to your computer and use it in GitHub Desktop.
Save danielbene/9fc89275106653c7454719a2fba922fe to your computer and use it in GitHub Desktop.
TLS fingerprint generation on linux (eg for esp8266 https connections)
#!/bin/bash
url="raw.githubusercontent.com"
echo "$(openssl s_client -connect $url:443 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'| openssl x509 -noout -fingerprint -sha1)" | sed "s/:/ /g"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment