source: mod_gnutls/test/test-16_view-status.bash @ 05984a0

proxy-ticket
Last change on this file since 05984a0 was 05984a0, checked in by Fiona Klute <fiona.klute@…>, 7 months ago

Replace "runtests" with "runtest.py"

This is the next step from handling HTTP requests and responses in
Python. In particular error handling is a lot easier to do in Python
than using Bash trap functions.

  • Property mode set to 100755
File size: 796 bytes
RevLine 
[c51e33a]1#!/bin/bash
[eb4cab7]2set -e
3
[05984a0]4# expected output files
5log="outputs/16_view-status.log"
[eb4cab7]6output="outputs/16_view-status.output"
[05984a0]7
8${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 16 \
9         --log-connection "${log}" --log-responses "${output}"
10
[eb4cab7]11# get the cipher suite reported by gnutls-cli
[05984a0]12cli_suite="$(grep -o -P '(?<=^-\sDescription:\s).*$' "${log}")" || true
[eb4cab7]13# extract cipher suite from the server status output
14status_suite="$(grep -o -P '(?<=^Current TLS session:\s).*$' "${output}")" \
15    || true
16
17echo
18if [[ -n "${cli_suite}" && "${status_suite}" = "${cli_suite}" ]]; then
19    echo "Server and client report matching cipher suite: ${status_suite}"
20else
21    echo "ERROR: Cipher suites mismatching or missing!"
22    echo "Server: '${status_suite}'"
23    echo "Client: '${cli_suite}'"
24    exit 1
25fi
Note: See TracBrowser for help on using the repository browser.