From b2521c8e42a5d8c2242d0ca11fdd865a3a09991e Mon Sep 17 00:00:00 2001 From: Richard Soderberg Date: Sat, 5 Sep 2015 04:35:58 -0700 Subject: [PATCH] Fixes instances of "SC2053: Quote the rhs of == in [[ ]] to prevent glob matching." In cipherscan line 469: if [[ ${known_certs[$cksum]} == $cert ]]; then ^-- SC2053: Quote the rhs of == in [[ ]] to prevent glob matching. In cipherscan line 852: if [[ $selected == $prefered ]]; then ^-- SC2053: Quote the rhs of == in [[ ]] to prevent glob matching. In cipherscan line 915: if [[ "$cname" == ${curves[$id]} ]]; then ^-- SC2053: Quote the rhs of == in [[ ]] to prevent glob matching. --- cipherscan | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cipherscan b/cipherscan index 62c0281..71bab44 100755 --- a/cipherscan +++ b/cipherscan @@ -503,7 +503,7 @@ test_cipher_on_target() { local cksum=($(cksum <<<"$cert")) # compare the values not just checksums so that eventual collision # doesn't mess up results - if [[ ${known_certs[$cksum]} == $cert ]]; then + if [[ ${known_certs[$cksum]} == "$cert" ]]; then if [[ -n "${current_certificates}" ]]; then current_certificates+="," fi @@ -886,7 +886,7 @@ test_serverside_ordering() { serverside="True" else local selected=($result) - if [[ $selected == $prefered ]]; then + if [[ $selected == "$prefered" ]]; then serverside="False" else serverside="True" @@ -949,7 +949,7 @@ test_curves() { current_curves+="$cname" fi for id in "${!curves[@]}"; do - if [[ "$cname" == ${curves[$id]} ]]; then + if [[ $cname == "${curves[$id]}" ]]; then # we know it's supported, remove it from set of offered ones unset curves[$id] break