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 {
my $p = find_exe_file_hpath($httptlssrvexe);
my @o = `$p -l`;
my $found;
for(@o) {
if(/Key exchange: SRP/) {
$found = 1;
last;
if($p) {
my @o = `"$p" -l`;
my $found;
for(@o) {
if(/Key exchange: SRP/) {
$found = 1;
last;
}
}
return $p if($found);
}
return $p if($found);
}