Created
October 6, 2017 22:00
-
-
Save hummus/7f80865ca5ef80f5880d308acba3d46a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# request CA via the host | |
openssl s_client -showcerts -connect www.example.com:443 < /dev/null | openssl x509 -outform PEM 2>/dev/null | |
# awk statement for wrangling | |
awk '/----BEGIN CERTIFICATE----/ { flag = 1; ++ctr } flag && ctr < 2 { print } /-----END CERTIFICATE-----/ { flag = 0 }' out | openssl x509 -noout -sha256 -fingerprint | |
# good luck though, not all servers give or have the CA accessible wtf. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment