source: mod_gnutls/test/test-16_view-status.bash @ 59afe51

Last change on this file since 59afe51 was eb4cab7, checked in by Fiona Klute <fiona.klute@…>, 3 years ago

Test suite: Compare cipher suites to test the status page

Expecting a fixed output required a fixed cipher suite, which could
break due to minor changes in GnuTLS. Instead require the status page
and client log to agree about the cipher suite in use. Fix header line
endings in the request while at it.

  • Property mode set to 100755
File size: 667 bytes
[eb4cab7]2set -e
[34e5dc7]3${srcdir}/runtests t-16
5# expected output file
7# get the cipher suite reported by gnutls-cli
8cli_suite="$(grep -o -P '(?<=^-\sDescription:\s).*$' "${output}")" || true
9# extract cipher suite from the server status output
10status_suite="$(grep -o -P '(?<=^Current TLS session:\s).*$' "${output}")" \
11    || true
14if [[ -n "${cli_suite}" && "${status_suite}" = "${cli_suite}" ]]; then
15    echo "Server and client report matching cipher suite: ${status_suite}"
17    echo "ERROR: Cipher suites mismatching or missing!"
18    echo "Server: '${status_suite}'"
19    echo "Client: '${cli_suite}'"
20    exit 1
Note: See TracBrowser for help on using the repository browser.