Last active
February 17, 2020 03:50
-
-
Save wktk/68bb366816a1dd05aeaf05020f7cbb71 to your computer and use it in GitHub Desktop.
Test TLS 1.0, 1.1, 1.2 connection
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
# brew install coreutils | |
function listtls() { | |
timeout 3 openssl s_client -connect "$1:443" -servername "$1" -tls1 < /dev/null > /dev/null 2>&1 && echo -n 1 || echo -n 0 | |
timeout 3 openssl s_client -connect "$1:443" -servername "$1" -tls1_1 < /dev/null > /dev/null 2>&1 && echo -n 1 || echo -n 0 | |
timeout 3 openssl s_client -connect "$1:443" -servername "$1" -tls1_2 < /dev/null > /dev/null 2>&1 && echo -n 1 || echo -n 0 | |
# timeout 3 openssl s_client -connect example.com:443 -tls1_3 < /dev/null > /dev/null 2>&1 && echo -n 1 || echo -n 0 | |
echo ", $1" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment