On Wed, Oct 10, 2018 at 12:27 PM <j...@apache.org> wrote:

> Author: jim
> Date: Wed Oct 10 17:27:33 2018
> New Revision: 1843478
>
> @@ -21,7 +21,7 @@ Apache::TestRequest::module('ssl_ocsp');
>  # support in earlier versions without messing around with stderr
>  my $openssl = Apache::TestSSLCA::openssl();
>  if (!have_min_apache_version('2.4.26')
> -    or `$openssl list-standard-commands 2>/dev/null` !~ /ocsp/) {
> +    or system("$openssl ocsp 2>/dev/null") == 0) {
>      print "1..0 # skip: No OpenSSL or mod_ssl OCSP support";
>      exit 0;
>  }
>

I think I know where the confusion is. system() returns 0 for success, and
the non-zero result code from invocation on failure.

You are testing whether `openssl ocsp` succeeds, skipping the test on
success and running the test on failure.

You meant to test whether `openssl ocsp` failed (non-zero), to skip the test

If you replace your test with system("$openssl ocsp -help 2>/dev/null") ==
0 you will observe that it goes haywire, because that command is valid when
ocsp is enabled.

Reply via email to