From ae6547f65fc7cf63046c854fd8f196759c7656ee Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 20 Jun 2022 18:01:30 +0200 Subject: [PATCH] REGTESTS: ssl: add the same cert for client/server Add the same certificate in server and bind line so we can try to catch problems like in issue #1748 when updating over the CLI. --- reg-tests/ssl/set_ssl_cafile.vtc | 2 ++ reg-tests/ssl/set_ssl_cert.vtc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/reg-tests/ssl/set_ssl_cafile.vtc b/reg-tests/ssl/set_ssl_cafile.vtc index c9dbf7490e..bda620f4e4 100644 --- a/reg-tests/ssl/set_ssl_cafile.vtc +++ b/reg-tests/ssl/set_ssl_cafile.vtc @@ -43,6 +43,8 @@ haproxy h1 -conf { listen clear-lst bind "fd@${clearlst}" + # dummy bind used to test a change when the same crt is used as server and bind + bind "fd@${foobarlst}" ssl crt ${testdir}/set_cafile_client.pem ca-file ${testdir}/set_cafile_interCA1.crt verify none server s1 "${tmpdir}/ssl.sock" ssl crt ${testdir}/set_cafile_client.pem ca-file ${testdir}/set_cafile_interCA1.crt verify none listen clear-verified-lst diff --git a/reg-tests/ssl/set_ssl_cert.vtc b/reg-tests/ssl/set_ssl_cert.vtc index 100d34323f..a0fe5e7339 100644 --- a/reg-tests/ssl/set_ssl_cert.vtc +++ b/reg-tests/ssl/set_ssl_cert.vtc @@ -69,6 +69,8 @@ haproxy h1 -conf { listen ssl-lst bind "${tmpdir}/ssl.sock" ssl crt ${testdir}/common.pem strict-sni server s1 ${s1_addr}:${s1_port} + # dummy server used to test a change when the same crt is used as server and bind + server s2 ${s1_addr}:${s1_port} ssl crt ${testdir}/common.pem verify none weight 0 listen other-ssl-lst bind "${tmpdir}/other-ssl.sock" ssl crt-list ${testdir}/set_default_cert.crt-list