]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REGTESTS: quic: issuers_chain_path.vtc supported by QUIC
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 28 Nov 2025 16:06:43 +0000 (17:06 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Mon, 8 Dec 2025 09:40:59 +0000 (10:40 +0100)
ssl/issuers_chain_path.vtc was rename to ssl/issuers_chain_path.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then issuers_chain_path.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC connection and "stream" for TCP connections);

reg-tests/quic/issuers_chain_path.vtc [new file with mode: 0644]
reg-tests/ssl/issuers_chain_path.vtc
reg-tests/ssl/issuers_chain_path.vtci [new file with mode: 0644]

diff --git a/reg-tests/quic/issuers_chain_path.vtc b/reg-tests/quic/issuers_chain_path.vtc
new file mode 100644 (file)
index 0000000..09d470a
--- /dev/null
@@ -0,0 +1,10 @@
+#REGTEST_TYPE=bug
+# This reg-test checks if the 'issuers-chain-path' work correctly
+#
+varnishtest "Test the issuers-chain-path keyword"
+feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.6)'"
+feature cmd "$HAPROXY_PROGRAM -cc 'feature(QUIC) && feature(OPENSSL) && openssl_version_atleast(1.1.1)'"
+feature cmd "command -v openssl && command -v socat"
+
+setenv VTC_SOCK_TYPE quic
+include ${testdir}/../ssl/issuers_chain_path.vtci
index 6c7de0a1cd40b73e7b0d7e786696872ef0f5bc42..98c5ccb7d51634b48af5aeb3d00b68fa65d794d7 100644 (file)
@@ -5,40 +5,6 @@ varnishtest "Test the issuers-chain-path keyword"
 feature cmd "$HAPROXY_PROGRAM -cc 'version_atleast(2.6)'"
 feature cmd "$HAPROXY_PROGRAM -cc 'feature(OPENSSL) && openssl_version_atleast(1.1.1)'"
 feature cmd "command -v openssl && command -v socat"
-feature ignore_unknown_macro
-
-haproxy h1 -conf {
-    global
-    .if feature(THREAD)
-        thread-groups 1
-    .endif
-
-        stats socket "${tmpdir}/h1/stats" level admin
-        issuers-chain-path "${testdir}/certs/issuers-chain-path/ca/"
-        crt-base "${testdir}/certs/issuers-chain-path"
-
-    defaults
-        mode http
-        option httplog
-        log stderr local0 debug err
-        option logasap
-        timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
-        timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
-        timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
-
-    frontend ssl-fe
-        bind "${tmpdir}/ssl.sock" ssl crt server.pem
-        http-request return status 200
-} -start
-
-
-# We should have two distinct ocsp responses known that were loaded at build time
-haproxy h1 -cli {
-       send "show ssl cert ${testdir}/certs/issuers-chain-path/server.pem"
-       expect ~ ".*Chain Filename.*"
-       send "show ssl cert ${testdir}/certs/issuers-chain-path/server.pem"
-       expect ~ ".*Chain Subject.*"
-}
-
-haproxy h1 -wait
 
+setenv VTC_SOCK_TYPE stream
+include ${testdir}/issuers_chain_path.vtci
diff --git a/reg-tests/ssl/issuers_chain_path.vtci b/reg-tests/ssl/issuers_chain_path.vtci
new file mode 100644 (file)
index 0000000..0daf7c3
--- /dev/null
@@ -0,0 +1,37 @@
+feature ignore_unknown_macro
+
+haproxy h1 -conf {
+    global
+    .if feature(THREAD)
+        thread-groups 1
+    .endif
+
+        stats socket "${tmpdir}/h1/stats" level admin
+        issuers-chain-path "${testdir}/certs/issuers-chain-path/ca/"
+        crt-base "${testdir}/certs/issuers-chain-path"
+
+    defaults
+        mode http
+        option httplog
+        log stderr local0 debug err
+        option logasap
+        timeout connect "${HAPROXY_TEST_TIMEOUT-5s}"
+        timeout client  "${HAPROXY_TEST_TIMEOUT-5s}"
+        timeout server  "${HAPROXY_TEST_TIMEOUT-5s}"
+
+    frontend ssl-fe
+        bind "${VTC_SOCK_TYPE}+fd@${ssl_fe}" ssl crt server.pem
+        http-request return status 200
+} -start
+
+
+# We should have two distinct ocsp responses known that were loaded at build time
+haproxy h1 -cli {
+       send "show ssl cert ${testdir}/certs/issuers-chain-path/server.pem"
+       expect ~ ".*Chain Filename.*"
+       send "show ssl cert ${testdir}/certs/issuers-chain-path/server.pem"
+       expect ~ ".*Chain Subject.*"
+}
+
+haproxy h1 -wait
+