From fdb6db485093510c8e697c82aa4481ed8eae3260 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Wed, 1 Apr 2020 17:13:22 +0200 Subject: [PATCH] REGTEST: ssl/cli: tests options and filters w/ add ssl crt-list Now that the 'add ssl crt-list' command supports filters and options, add some in the vtc file to test them. --- reg-tests/ssl/add_ssl_crt-list.vtc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reg-tests/ssl/add_ssl_crt-list.vtc b/reg-tests/ssl/add_ssl_crt-list.vtc index 173db56c1..a02ccf4a9 100644 --- a/reg-tests/ssl/add_ssl_crt-list.vtc +++ b/reg-tests/ssl/add_ssl_crt-list.vtc @@ -46,7 +46,7 @@ shell { echo "new ssl cert ${testdir}/ecdsa.pem" | socat "${tmpdir}/h1/stats" - printf "set ssl cert ${testdir}/ecdsa.pem <<\n$(cat ${testdir}/ecdsa.pem)\n\n" | socat "${tmpdir}/h1/stats" - echo "commit ssl cert ${testdir}/ecdsa.pem" | socat "${tmpdir}/h1/stats" - - echo "add ssl crt-list ${testdir}/localhost.crt-list ${testdir}/ecdsa.pem" | socat "${tmpdir}/h1/stats" - + printf "add ssl crt-list ${testdir}/localhost.crt-list <<\n${testdir}/ecdsa.pem [verify none allow-0rtt] localhost !www.test1.com\n\n" | socat "${tmpdir}/h1/stats" - } haproxy h1 -cli { @@ -56,7 +56,8 @@ haproxy h1 -cli { haproxy h1 -cli { send "show ssl crt-list ${testdir}/localhost.crt-list" - expect ~ ".*${testdir}/ecdsa.pem" + # check the options and the filters in any order + expect ~ ".*${testdir}/ecdsa.pem \\[(?=.*verify none)(?=.*allow-0rtt).*\\](?=.*!www.test1.com)(?=.*localhost).*" } shell {