From 4e3b2318ab382fbef2a984175c7cfdcf720e738e Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 20 Jul 2017 19:13:06 +0200 Subject: [PATCH] FIX #795 awk had word match, didn't work and wasn't needed If certicate was determined before running dorwn, we needed to remove "SHA256 " (regression) --- testssl.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testssl.sh b/testssl.sh index 58057ad..6a42a73 100755 --- a/testssl.sh +++ b/testssl.sh @@ -10289,7 +10289,7 @@ run_drown() { [[ $? -eq 0 ]] && cert_fingerprint_sha2="$($OPENSSL x509 -noout -in $HOSTCERT -fingerprint -sha256 2>>$ERRFILE | sed -e 's/^.*Fingerprint=//' -e 's/://g' )" else cert_fingerprint_sha2="$RSA_CERT_FINGERPRINT_SHA2" - # cert_fingerprint_sha2=${cert_fingerprint_sha2/SHA256 /} + cert_fingerprint_sha2=${cert_fingerprint_sha2/SHA256 /} fi sslv2_sockets @@ -11416,7 +11416,7 @@ prepare_arrays() { if [[ $OSSL_VER_MAJOR -lt 1 ]]; then [[ ":${ossl_supported_tls}:" =~ ":${TLS_CIPHER_OSSL_NAME[i]}:" ]] && TLS_CIPHER_OSSL_SUPPORTED[i]=true else - ossl_ciph="$(awk '/\<'"$hexc"'\>/ { print $3 }' <<< "$ossl_supported_tls")" + ossl_ciph="$(awk '/'"$hexc"'/ { print $3 }' <<< "$ossl_supported_tls")" if [[ -n "$ossl_ciph" ]]; then TLS_CIPHER_OSSL_SUPPORTED[i]=true [[ "$ossl_ciph" != "${TLS_CIPHER_OSSL_NAME[i]}" ]] && TLS_CIPHER_OSSL_NAME[i]="$ossl_ciph"