2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-26 07:53:41 +01:00

Replace instances of string-ish [[ -eq ]] with arithmetic (( == )).

This commit is contained in:
Richard Soderberg 2015-09-05 02:23:22 -07:00
parent 90ac19cfe8
commit 9c63841e46

View File

@ -850,7 +850,7 @@ test_serverside_ordering() {
serverside="True" serverside="True"
return 0 return 0
# server supports just two ciphers, so rotate them, that should be enough # server supports just two ciphers, so rotate them, that should be enough
elif [[ ${#cipherspref[@]} -eq 2 ]]; then elif (( ${#cipherspref[@]} == 2 )); then
local cipher=(${cipherspref[1]}) local cipher=(${cipherspref[1]})
prefered="$cipher" prefered="$cipher"
@ -1303,7 +1303,7 @@ test_tls_tolerance() {
} }
# If no options are given, give usage information and exit (with error code) # If no options are given, give usage information and exit (with error code)
if [[ $# -eq 0 ]]; then if (( $# == 0 )); then
usage usage
exit 1 exit 1
fi fi
@ -1474,7 +1474,7 @@ get_cipher_pref $CIPHERSUITE
# do that either when the normal scan returns no ciphers or just SSLv2 # do that either when the normal scan returns no ciphers or just SSLv2
# ciphers (where it's likely that the limiting by OpenSSL worked) # ciphers (where it's likely that the limiting by OpenSSL worked)
pref=(${cipherspref[0]}) pref=(${cipherspref[0]})
if [[ ${#cipherspref[@]} -eq 0 ]] || [[ ${pref[1]} == "SSLv2" ]]; then if (( ${#cipherspref[@]} == 0 )) || [[ ${pref[1]} == "SSLv2" ]]; then
cipherspref=() cipherspref=()
ciphercertificates=() ciphercertificates=()
results=() results=()