From: Jay Satiro Date: Mon, 6 Mar 2023 08:47:16 +0000 (-0500) Subject: tests: fix gnutls-serv check X-Git-Tag: curl-8_0_0~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c12e8bfa894c32d6a82cf662859cd0015db1ae18;p=thirdparty%2Fcurl.git 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 --- diff --git a/tests/sshhelp.pm b/tests/sshhelp.pm index 6cba41d9ef..e2e1e5eb96 100644 --- a/tests/sshhelp.pm +++ b/tests/sshhelp.pm @@ -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); }