Skip to content

Instantly share code, notes, and snippets.

@keltia
Created April 17, 2018 13:04
Show Gist options
  • Save keltia/6af17e2cef6204c5f9897a1f0726dd88 to your computer and use it in GitHub Desktop.
Save keltia/6af17e2cef6204c5f9897a1f0726dd88 to your computer and use it in GitHub Desktop.
Generate a SPKI hash for Stubby
echo | openssl s_client -connect '9.9.9.9:853' 2>/dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
# replace 9.9.9.9 by 1.1.1.1/1.0.0.1/etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment