2
0
mirror of https://github.com/mozilla/cipherscan.git synced 2024-11-25 15:33:41 +01:00

Replace instances of [[ $ != "" ]] with [[ -n "" ]].

This commit is contained in:
Richard Soderberg 2015-09-05 04:17:47 -07:00
parent 5c09af67fd
commit c103805a38

View File

@ -615,7 +615,7 @@ test_cipher_on_target() {
has_curves="True" has_curves="True"
if [[ $TEST_CURVES == "True" ]]; then if [[ $TEST_CURVES == "True" ]]; then
test_curves test_curves
if [[ "$ecc_ciphers" != "" ]]; then if [[ -n $ecc_ciphers ]]; then
ecc_ciphers+=":" ecc_ciphers+=":"
fi fi
ecc_ciphers+="$cipher" ecc_ciphers+="$cipher"
@ -702,7 +702,7 @@ display_results_in_terminal() {
trusted="${cipher_data[4]}" trusted="${cipher_data[4]}"
tickethint="${cipher_data[5]}" tickethint="${cipher_data[5]}"
ocspstaple="${cipher_data[6]}" ocspstaple="${cipher_data[6]}"
if [[ $TEST_CURVES == "True" && "${cipher_data[9]}" != "" ]]; then if [[ $TEST_CURVES == "True" && -n ${cipher_data[9]} ]]; then
curvesordering="${cipher_data[9]}" curvesordering="${cipher_data[9]}"
fi fi
else else
@ -721,10 +721,10 @@ display_results_in_terminal() {
if [[ "$ocspstaple" != "${cipher_data[6]}" ]]; then if [[ "$ocspstaple" != "${cipher_data[6]}" ]]; then
different=True different=True
fi fi
if [[ "$curvesordering" == "" && "${cipher_data[9]}" != "" ]]; then if [[ "$curvesordering" == "" && -n "${cipher_data[9]}" ]]; then
curvesordering="${cipher_data[9]}" curvesordering="${cipher_data[9]}"
fi fi
if [[ "$curvesordering" != "" && "$curvesordering" != "${cipher_data[9]}" ]]; then if [[ -n $curvesordering && "$curvesordering" != "${cipher_data[9]}" ]]; then
different=True different=True
fi fi
fi fi
@ -941,7 +941,7 @@ test_curves() {
local ephem_data=(${current_pfs//,/ }) local ephem_data=(${current_pfs//,/ })
local cname="" local cname=""
if [[ ${ephem_data[0]} =~ ECDH ]]; then if [[ ${ephem_data[0]} =~ ECDH ]]; then
if [[ "$current_curves" != "" ]]; then if [[ -n $current_curves ]]; then
current_curves+="," current_curves+=","
fi fi
cname="$(get_curve_name ${ephem_data[1]})" cname="$(get_curve_name ${ephem_data[1]})"