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
This commit is contained in:
Yedaya Katsman 2025-05-30 18:37:47 +03:00 committed by Daniel Stenberg
parent 4977747f0d
commit 215b5f389a
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View 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';
}