Changeset eb4cab7 in mod_gnutls for test/test-16_view-status.bash


Ignore:
Timestamp:
Sep 28, 2018, 1:44:29 PM (14 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
debian/master, master
Children:
1754503
Parents:
c33ef88
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test-16_view-status.bash

    rc33ef88 reb4cab7  
    11#!/bin/bash
     2set -e
    23${srcdir}/runtests t-16
     4
     5# expected output file
     6output="outputs/16_view-status.output"
     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
     12
     13echo
     14if [[ -n "${cli_suite}" && "${status_suite}" = "${cli_suite}" ]]; then
     15    echo "Server and client report matching cipher suite: ${status_suite}"
     16else
     17    echo "ERROR: Cipher suites mismatching or missing!"
     18    echo "Server: '${status_suite}'"
     19    echo "Client: '${cli_suite}'"
     20    exit 1
     21fi
Note: See TracChangeset for help on using the changeset viewer.