2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-22 14:23:41 +01:00

Enable Server Name Indication by default

This commit is contained in:
Julien Vehent 2015-09-18 13:04:31 -04:00
parent afc1755519
commit d90f3b0324

View File

@ -185,6 +185,7 @@ SAVECRT=""
TEST_CURVES="True" TEST_CURVES="True"
has_curves="False" has_curves="False"
TEST_TOLERANCE="True" TEST_TOLERANCE="True"
SNI="True"
# openssl formated list of curves that will cause server to select ECC suite # openssl formated list of curves that will cause server to select ECC suite
ecc_ciphers="" ecc_ciphers=""
unset known_certs unset known_certs
@ -229,6 +230,7 @@ Use one of the options below:
--savecrt path where to save untrusted and leaf certificates --savecrt path where to save untrusted and leaf certificates
--[no-]curves test ECC curves supported by server (req. OpenSSL 1.0.2) --[no-]curves test ECC curves supported by server (req. OpenSSL 1.0.2)
--[no-]tolerance test TLS tolerance --[no-]tolerance test TLS tolerance
--no-sni don't use Server Name Indication
-v | --verbose Increase verbosity. -v | --verbose Increase verbosity.
The rest of the arguments will be interpreted as openssl s_client argument. The rest of the arguments will be interpreted as openssl s_client argument.
@ -1416,6 +1418,10 @@ do
TEST_TOLERANCE="False" TEST_TOLERANCE="False"
shift 1 shift 1
;; ;;
--no-sni)
SNI="False"
shift 1
;;
--) # End of all options --) # End of all options
shift shift
break break
@ -1455,7 +1461,13 @@ if [[ -z $TARGET || $TARGET =~ ^[-:] || $TARGET =~ :.*[^0-9] ]]; then
exit 1 exit 1
fi fi
if ! [[ $TARGET =~ : ]]; then if ! [[ $TARGET =~ : ]]; then
sni_target=$TARGET
TARGET="${TARGET}:443" TARGET="${TARGET}:443"
else
# strip the port for the sni_target
if [[ "$TARGET" =~ (.*):([0-9]{1,5}) ]]; then
sni_target="${BASH_REMATCH[1]}"
fi
fi fi
debug "target: $TARGET" debug "target: $TARGET"
@ -1504,6 +1516,9 @@ if [[ $VERBOSE != 0 ]] ; then
fi fi
SCLIENTARGS="${PARAMS[*]}" SCLIENTARGS="${PARAMS[*]}"
if [[ $SNI == "True" ]]; then
SCLIENTARGS="$SCLIENTARGS -servername $sni_target"
fi
debug "sclientargs: $SCLIENTARGS" debug "sclientargs: $SCLIENTARGS"