From: Yedaya Katsman Date: Fri, 30 May 2025 15:37:47 +0000 (+0300) Subject: tests: fix checks for https-mtls proto X-Git-Tag: curl-8_14_1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=215b5f389a2a0beb4731961a80f376cb3d519602;p=thirdparty%2Fcurl.git 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 --- 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'; }