mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-26 07:53:41 +01:00
Replace instances of [[ $ == "" ]] with [[ -z "" ]].
This commit is contained in:
parent
236b0b8cfe
commit
ce2f97f05c
14
cipherscan
14
cipherscan
@ -49,9 +49,9 @@ else
|
|||||||
# test that readlink or greadlink (darwin) are present
|
# test that readlink or greadlink (darwin) are present
|
||||||
READLINKBIN="$(which readlink)"
|
READLINKBIN="$(which readlink)"
|
||||||
|
|
||||||
if [[ "$READLINKBIN" == "" ]]; then
|
if [[ -z $READLINKBIN ]]; then
|
||||||
READLINKBIN="$(which greadlink)"
|
READLINKBIN="$(which greadlink)"
|
||||||
if [[ "$READLINKBIN" == "" ]]; then
|
if [[ -z $READLINKBIN ]]; then
|
||||||
echo "neither readlink nor greadlink are present. install coreutils with {apt-get,yum,brew} install coreutils" 1>&2
|
echo "neither readlink nor greadlink are present. install coreutils with {apt-get,yum,brew} install coreutils" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -60,9 +60,9 @@ else
|
|||||||
# test that timeout or gtimeout (darwin) are present
|
# test that timeout or gtimeout (darwin) are present
|
||||||
TIMEOUTBIN="$(which timeout)"
|
TIMEOUTBIN="$(which timeout)"
|
||||||
|
|
||||||
if [[ "$TIMEOUTBIN" == "" ]]; then
|
if [[ -z $TIMEOUTBIN ]]; then
|
||||||
TIMEOUTBIN="$(which gtimeout)"
|
TIMEOUTBIN="$(which gtimeout)"
|
||||||
if [[ "$TIMEOUTBIN" == "" ]]; then
|
if [[ -z $TIMEOUTBIN ]]; then
|
||||||
echo "neither timeout nor gtimeout are present. install coreutils with {apt-get,yum,brew} install coreutils" 1>&2
|
echo "neither timeout nor gtimeout are present. install coreutils with {apt-get,yum,brew} install coreutils" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -721,7 +721,7 @@ display_results_in_terminal() {
|
|||||||
if [[ "$ocspstaple" != "${cipher_data[6]}" ]]; then
|
if [[ "$ocspstaple" != "${cipher_data[6]}" ]]; then
|
||||||
different=True
|
different=True
|
||||||
fi
|
fi
|
||||||
if [[ "$curvesordering" == "" && -n "${cipher_data[9]}" ]]; then
|
if [[ -z $curvesordering && -n "${cipher_data[9]}" ]]; then
|
||||||
curvesordering="${cipher_data[9]}"
|
curvesordering="${cipher_data[9]}"
|
||||||
fi
|
fi
|
||||||
if [[ -n $curvesordering && "$curvesordering" != "${cipher_data[9]}" ]]; then
|
if [[ -n $curvesordering && "$curvesordering" != "${cipher_data[9]}" ]]; then
|
||||||
@ -813,7 +813,7 @@ display_results_in_json() {
|
|||||||
echo -n "\"ticket_hint\":\"${cipher_arr[5]}\","
|
echo -n "\"ticket_hint\":\"${cipher_arr[5]}\","
|
||||||
echo -n "\"ocsp_stapling\":\"${cipher_arr[6]}\","
|
echo -n "\"ocsp_stapling\":\"${cipher_arr[6]}\","
|
||||||
pfs="${cipher_arr[7]}"
|
pfs="${cipher_arr[7]}"
|
||||||
[[ "$pfs" == "" ]] && pfs="None"
|
[[ -z $pfs ]] && pfs="None"
|
||||||
echo -n "\"pfs\":\"$pfs\""
|
echo -n "\"pfs\":\"$pfs\""
|
||||||
if [[ "${cipher_arr[0]}" =~ ECDH ]]; then
|
if [[ "${cipher_arr[0]}" =~ ECDH ]]; then
|
||||||
echo -n ","
|
echo -n ","
|
||||||
@ -1019,7 +1019,7 @@ test_curves_fallback() {
|
|||||||
# client doesn't advertise support for curves the server needs
|
# client doesn't advertise support for curves the server needs
|
||||||
fallback_supported="unknown"
|
fallback_supported="unknown"
|
||||||
|
|
||||||
if [[ "$ecc_ciphers" == "" ]]; then
|
if [[ -z $ecc_ciphers ]]; then
|
||||||
verbose "No ECC cipher found, can't test curve fallback"
|
verbose "No ECC cipher found, can't test curve fallback"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user