diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-20 21:45:46 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-20 21:46:40 (EDT) |
commit | 54397f0cb9ca32207bf0860a63c4b9ec58b99acd (patch) | |
tree | c5645cce438235c3f466932f6b2b92cbb0a02ffe /tests | |
parent | 7baeec83e7295d3286fb74a8c1d4f8b442158317 (diff) |
tests/badssl.sh: Organize output
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/badssl.sh | 8 |
1 files changed, 5 insertions, 3 deletions
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}" } |