From 54397f0cb9ca32207bf0860a63c4b9ec58b99acd Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 20 Jul 2020 21:45:46 -0400 Subject: tests/badssl.sh: Organize output --- diff --git a/tests/badssl.sh b/tests/badssl.sh index 809a9f1..d014e7e 100755 --- a/tests/badssl.sh +++ b/tests/badssl.sh @@ -28,23 +28,25 @@ do_test() local host="${3}" local port="${4}" shift 4 + local out= local result= - if ${ok} "${TOP_BUILDDIR}/wolfutil" s_client \ + if out="$(${ok} "${TOP_BUILDDIR}/wolfutil" s_client \ -connect "${host}.badssl.com:${port}" \ - -servername "${host}.badssl.com" \ + -servername "${host}.badssl.com" 2>&1 \ <<-EOF GET / HTTP/1.1 Host: ${host}.badssl.com:${port} Connection: close EOF + )" then result='ok' else result='not ok' fi - printf '\n' + printf '%s\n' "${out}" | sed 's/^/ | /' result_ "${result}" -D "${directive}" -- "${ok} ${host}" } -- cgit v0.9.1