From c12e8bfa894c32d6a82cf662859cd0015db1ae18 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Mon, 6 Mar 2023 03:47:16 -0500 Subject: [PATCH] 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 --- tests/sshhelp.pm | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) 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); }