From 5e3d4d127cf751891cec08505222e472072389e6 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Wed, 8 Jun 2016 12:07:23 -0400 Subject: [PATCH] Mask error when no $MAPPING_FILE_RFC Redirect error output to $ERRFILE if $MAPPING_FILE_RFC is missing. --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index da7fa09..3f56c3d 100755 --- a/testssl.sh +++ b/testssl.sh @@ -1455,7 +1455,7 @@ openssl2rfc() { hexcode=$($OPENSSL ciphers -V "$1" 2>>$ERRFILE | head -1 | awk '{ print $1 }') [[ -z "$hexcode" ]] && return 0 normalize_ciphercode $hexcode - rfcname="$(strip_spaces $(grep -iw "$HEXC" "$MAPPING_FILE_RFC" | sed -e 's/^.*TLS/TLS/' -e 's/^.*SSL/SSL/'))" + rfcname="$(strip_spaces $(grep -iw "$HEXC" "$MAPPING_FILE_RFC" 2>>$ERRFILE | sed -e 's/^.*TLS/TLS/' -e 's/^.*SSL/SSL/'))" [[ -n "$rfcname" ]] && out "$rfcname" return 0 } @@ -1464,7 +1464,7 @@ rfc2openssl() { local hexcode ossl_hexcode ossl_name local -i len - hexcode=$(grep -iw "$1" "$MAPPING_FILE_RFC" | head -1 | awk '{ print $1 }') + hexcode=$(grep -iw "$1" "$MAPPING_FILE_RFC" 2>>$ERRFILE | head -1 | awk '{ print $1 }') [[ -z "$hexcode" ]] && return 0 len=${#hexcode} case $len in