From 7881dc386c8e5c32b40823a17e5da674b66ae307 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 23 Oct 2018 14:23:38 +0200 Subject: [PATCH 1/3] Remove trailing spaces --- testssl.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/testssl.sh b/testssl.sh index 6f14f7f..789db91 100755 --- a/testssl.sh +++ b/testssl.sh @@ -6697,7 +6697,7 @@ extract_stapled_ocsp() { local response="$(cat $TMPFILE)" local ocsp tmp local -i ocsp_len - + STAPLED_OCSP_RESPONSE="" if [[ "$response" =~ "CertificateStatus" ]]; then # This is OpenSSL 1.1.0 or 1.1.1 and the response @@ -6737,7 +6737,7 @@ extract_stapled_ocsp() { ocsp_len=2*$(hex2dec "${tls_certificate_status_ascii:8:6}") STAPLED_OCSP_RESPONSE="${ocsp:14:ocsp_len}" fi - return 0 + return 0 } # arg1 is "-cipher " or empty @@ -15933,7 +15933,7 @@ mybanner() { bb1=$(cat < Date: Tue, 23 Oct 2018 14:25:36 +0200 Subject: [PATCH 2/3] Remove duplicate commas in CSV output --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index 789db91..0130caf 100755 --- a/testssl.sh +++ b/testssl.sh @@ -904,7 +904,7 @@ fileout() { local finding=$(strip_lf "$(newline_to_spaces "$(strip_quote "$3")")") # additional quotes will mess up screen output [[ -e "$JSONFILE" ]] && [[ ! -d "$JSONFILE" ]] && fileout_json_finding "$1" "$severity" "$finding" "$cve" "$cwe" "$hint" "$do_csv" && [[ -n "$CSVFILE" ]] && [[ ! -d "$CSVFILE" ]] && \ - fileout_csv_finding "$1" "$NODE/$NODEIP", "$PORT", "$severity" "$finding" "$cve" "$cwe" "$hint" + fileout_csv_finding "$1" "$NODE/$NODEIP" "$PORT" "$severity" "$finding" "$cve" "$cwe" "$hint" "$FIRST_FINDING" && FIRST_FINDING=false fi } From e184f94b8ad3098e891a22273dedf1acc670b3b6 Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Wed, 24 Oct 2018 08:27:19 +0200 Subject: [PATCH 3/3] Revert "Remove trailing spaces" This reverts commit 7881dc386c8e5c32b40823a17e5da674b66ae307. --- testssl.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/testssl.sh b/testssl.sh index 0130caf..89f75a6 100755 --- a/testssl.sh +++ b/testssl.sh @@ -6697,7 +6697,7 @@ extract_stapled_ocsp() { local response="$(cat $TMPFILE)" local ocsp tmp local -i ocsp_len - + STAPLED_OCSP_RESPONSE="" if [[ "$response" =~ "CertificateStatus" ]]; then # This is OpenSSL 1.1.0 or 1.1.1 and the response @@ -6737,7 +6737,7 @@ extract_stapled_ocsp() { ocsp_len=2*$(hex2dec "${tls_certificate_status_ascii:8:6}") STAPLED_OCSP_RESPONSE="${ocsp:14:ocsp_len}" fi - return 0 + return 0 } # arg1 is "-cipher " or empty @@ -15933,7 +15933,7 @@ mybanner() { bb1=$(cat <