Prevent running stunnel unless its version can be determined.
authorYang Tse <yangsita@gmail.com>
Fri, 27 Nov 2009 13:01:10 +0000 (13:01 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 27 Nov 2009 13:01:10 +0000 (13:01 +0000)
tests/httpsserver.pl

index 45eb920..a21307d 100644 (file)
@@ -87,7 +87,13 @@ foreach my $veropt (('-version', '-V')) {
 
 my $cmd;
 if(!$ver_major) {
-    print "no stunnel or unknown version\n";
+    if(-x "$stunnel" && ! -d "$stunnel") {
+        print "unknown stunnel version\n";
+    }
+    else {
+        print "no stunnel\n";
+    }
+    exit;
 }
 elsif($ver_major < 4) {
     # stunnel version less than 4.00