asynciodebian/masterproxy-ticket
Last change
on this file since eb4cab7 was
eb4cab7,
checked in by Fiona Klute <fiona.klute@…>, 4 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
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | set -e |
---|
3 | ${srcdir}/runtests t-16 |
---|
4 | |
---|
5 | # expected output file |
---|
6 | output="outputs/16_view-status.output" |
---|
7 | # get the cipher suite reported by gnutls-cli |
---|
8 | cli_suite="$(grep -o -P '(?<=^-\sDescription:\s).*$' "${output}")" || true |
---|
9 | # extract cipher suite from the server status output |
---|
10 | status_suite="$(grep -o -P '(?<=^Current TLS session:\s).*$' "${output}")" \ |
---|
11 | || true |
---|
12 | |
---|
13 | echo |
---|
14 | if [[ -n "${cli_suite}" && "${status_suite}" = "${cli_suite}" ]]; then |
---|
15 | echo "Server and client report matching cipher suite: ${status_suite}" |
---|
16 | else |
---|
17 | echo "ERROR: Cipher suites mismatching or missing!" |
---|
18 | echo "Server: '${status_suite}'" |
---|
19 | echo "Client: '${cli_suite}'" |
---|
20 | exit 1 |
---|
21 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.