tests: fix gnutls-serv check

- If gnutls-serv doesn't exist then don't try to execute it.

Follow-up to 2fdc1d81.

Closes https://github.com/curl/curl/pull/10688
This commit is contained in:
Jay Satiro 2023-03-06 03:47:16 -05:00
parent 54605666ed
commit c12e8bfa89

View file

@ -409,15 +409,17 @@ sub find_sshkeygen {
# #
sub find_httptlssrv { sub find_httptlssrv {
my $p = find_exe_file_hpath($httptlssrvexe); my $p = find_exe_file_hpath($httptlssrvexe);
my @o = `$p -l`; if($p) {
my $found; my @o = `"$p" -l`;
for(@o) { my $found;
if(/Key exchange: SRP/) { for(@o) {
$found = 1; if(/Key exchange: SRP/) {
last; $found = 1;
last;
}
} }
return $p if($found);
} }
return $p if($found);
} }