Created
April 12, 2023 19:21
-
-
Save Indigenuity/aa53158555ca826e6568822adcbf7d65 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
#!/usr/bin/env bash | |
response_code=$(curl -s -o /dev/null -w "%{http_code}" https://tls-check.hazardhub.com) | |
error_code=$? | |
if [[ $error_code -eq 35 ]]; then | |
echo "Your client may not support TLS 1.2 or higher. Check with guides for your operating system for update procedures" | |
elif [[ $response_code -ne 200 ]]; then | |
echo "Got unexpected response code: $response_code, with curl error code: $error_code" | |
echo "This script only knows how to check for TLS compatibility, it looks like you've encountered a different problem" | |
else | |
echo "Success! Your client supports TLS 1.2 or higher." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment