Created
August 18, 2021 21:00
-
-
Save DoctorD90/b8ef294c82b78ab807de6c533194e5c1 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
#!/bin/bash | |
# Replace with the hostname/FQDN of the Server | |
sslhost=github.com | |
# Replace with the SSL port of the Server | |
sslport=443 | |
sslcert=$(openssl s_client -showcerts -connect "$sslhost":"$sslport" < /dev/null) | |
echo "$sslcert" | openssl x509 -noout -serial | |
echo "$sslcert" | openssl x509 -noout -hash | |
echo "$sslcert" | openssl x509 -noout -dates | |
echo "$sslcert" | openssl x509 -noout -fingerprint -md5 | |
echo "$sslcert" | openssl x509 -noout -fingerprint -sha1 | |
echo "$sslcert" | openssl x509 -noout -fingerprint -sha256 | |
echo "$sslcert" | openssl x509 -noout -fingerprint -sha512 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment