Skip to content

Instantly share code, notes, and snippets.

@andypiper
Last active February 27, 2017 15:28
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 andypiper/84c78dd17cda675078cdbb7ef6a0d31d to your computer and use it in GitHub Desktop.
Save andypiper/84c78dd17cda675078cdbb7ef6a0d31d to your computer and use it in GitHub Desktop.
Quick way to validate a web server SSL configuration will work with SNI / Java 7+ http://stackoverflow.com/questions/7615645/ssl-handshake-alert-unrecognized-name-error-since-upgrade-to-java-1-7-0
#!/bin/zsh
SERVER=$1
echo "Testing $1...\r\n"
echo -e "HEAD / HTTP/1.0\r\nHost: $SERVER\r\n\r\n" | /usr/local/Cellar/openssl/1.0.2j/bin/openssl s_client -servername $SERVER -connect $SERVER:443 -state -quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment