]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests: fix gnutls-serv check
authorJay Satiro <raysatiro@yahoo.com>
Mon, 6 Mar 2023 08:47:16 +0000 (03:47 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Mon, 6 Mar 2023 08:52:46 +0000 (03:52 -0500)
- 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

index 6cba41d9efb37857845fc5e870e80fbead019cda..e2e1e5eb96a263052aacca908967b39fa1e3bdef 100644 (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);
 }