]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: fix checks for https-mtls proto
authorYedaya Katsman <yedaya.ka@gmail.com>
Fri, 30 May 2025 15:37:47 +0000 (18:37 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 31 May 2025 13:20:21 +0000 (15:20 +0200)
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

index e9c7f647f23662415cad9510aab0a14b976ca47f..1fe7b7167e12569dc6c10a321aca4e4a421e5018 100644 (file)
@@ -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';
         }