From 215b5f389a2a0beb4731961a80f376cb3d519602 Mon Sep 17 00:00:00 2001 From: Yedaya Katsman Date: Fri, 30 May 2025 18:37:47 +0300 Subject: [PATCH] tests: fix checks for https-mtls proto If there were two tests using the "https-mtls" server there was a perl unbound variable error, since certfile wan't set. Additionally, once the responsiveserver function was actually called, it failed finding a responsiveness function. For now I made it use the `verifypid` function, since the curl execution in `verifyhttp` doesn't know about client certificates. Closes #17493 --- tests/servers.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/servers.pm b/tests/servers.pm index e9c7f647f2..1fe7b7167e 100644 --- a/tests/servers.pm +++ b/tests/servers.pm @@ -1025,6 +1025,7 @@ sub verifytelnet { my %protofunc = ('http' => \&verifyhttp, 'https' => \&verifyhttp, + 'https-mtls' => \&verifypid, 'rtsp' => \&verifyrtsp, 'ftp' => \&verifyftp, 'pop3' => \&verifyftp, @@ -2361,7 +2362,7 @@ sub startservers { $what =~ s/[^a-z0-9\/-]//g; my $certfile; - if($what =~ /^(ftp|gopher|http|imap|pop3|smtp)s((\d*)(-ipv6|-unix|))$/) { + if($what =~ /^(ftp|gopher|http|imap|pop3|smtp)s|https-mtls((\d*)(-ipv6|-unix|))$/) { $certfile = ($whatlist[1]) ? $whatlist[1] : 'certs/test-localhost.pem'; }