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,7 +409,8 @@ 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 @o = `"$p" -l`;
my $found; my $found;
for(@o) { for(@o) {
if(/Key exchange: SRP/) { if(/Key exchange: SRP/) {
@ -419,6 +420,7 @@ sub find_httptlssrv {
} }
return $p if($found); return $p if($found);
} }
}
#*************************************************************************** #***************************************************************************