From 6f273b1a5fbd856b137bf4f814612664d6311832 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 27 Nov 2009 13:01:10 +0000 Subject: [PATCH] Prevent running stunnel unless its version can be determined. --- tests/httpsserver.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/httpsserver.pl b/tests/httpsserver.pl index 45eb92060..a21307df2 100644 --- a/tests/httpsserver.pl +++ b/tests/httpsserver.pl @@ -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