Skip to content

Instantly share code, notes, and snippets.

@agustik
Created February 27, 2020 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agustik/e8104875c29170f2bd88300cba53c0e4 to your computer and use it in GitHub Desktop.
Save agustik/e8104875c29170f2bd88300cba53c0e4 to your computer and use it in GitHub Desktop.
test ssl/tls version on server
#!/bin/bash
server=$1
for version in ssl1 tls1 tls1_1 tls1_2 tls1_3; do
echo "Testing $version on $server";
echo | openssl s_client -connect $server:443 -$version > /dev/null 2> /dev/null;
o=$?
if [[ "$o" == "0" ]]; then
echo "$version is supported";
else
echo "$version is NOT supported";
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment