diff --git a/cipherscan b/cipherscan index 75af88c..4f467d6 100755 --- a/cipherscan +++ b/cipherscan @@ -651,10 +651,8 @@ get_cipher_pref() { sslcommand+=" -status $SCLIENTARGS -connect $TARGET -cipher $ciphersuite" verbose "Connecting to '$TARGET' with ciphersuite '$ciphersuite'" - test_cipher_on_target "$sslcommand" - local success=$? # If the connection succeeded with the current cipher, benchmark and store - if [[ $success -eq 0 ]]; then + if test_cipher_on_target "$sslcommand"; then cipherspref=("${cipherspref[@]}" "$result") ciphercertificates=("${ciphercertificates[@]}" "$certificates") pciph=($result) @@ -1510,8 +1508,7 @@ if [[ -n $ALLCIPHERS ]]; then for c in $($OPENSSLBIN ciphers -v ALL:COMPLEMENTOFALL 2>/dev/null |awk '{print $1}'|sort -u); do r="fail" osslcommand="$TIMEOUTBIN $TIMEOUT $OPENSSLBIN s_client $SCLIENTARGS -connect $TARGET -cipher $c" - test_cipher_on_target "$osslcommand" - if [[ $? -eq 0 ]]; then + if test_cipher_on_target "$osslcommand"; then r="pass" fi echo "$c $r"|awk '{printf "%-35s %s\n",$1,$2}'