This commit is contained in:
Richard Hansen 2025-01-20 09:25:40 +01:00 committed by GitHub
commit 076a7a4b6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -133,9 +133,8 @@ our $other_ca_file = "$certdir/other-ca-cert.pem";
my %daemons; my %daemons;
sub httpd { sub httpd {
my ($ipv, $ssl) = @_; my $ipv = shift // '';
$ipv //= ''; my $ssl = !!shift;
$ssl = !!$ssl;
return undef if !$httpd_supported; return undef if !$httpd_supported;
return undef if $ipv eq '6' && !$httpd_ipv6_supported; return undef if $ipv eq '6' && !$httpd_ipv6_supported;
return undef if $ssl && !$httpd_ssl_supported; return undef if $ssl && !$httpd_ssl_supported;
@ -153,6 +152,7 @@ sub httpd {
(SSL_cert_file => "$certdir/dummy-server-cert.pem", (SSL_cert_file => "$certdir/dummy-server-cert.pem",
SSL_key_file => "$certdir/dummy-server-key.pem") x $ssl, SSL_key_file => "$certdir/dummy-server-key.pem") x $ssl,
}, },
@_,
); );
} }
return $daemons{$ipv}{$ssl}; return $daemons{$ipv}{$ssl};