All we are checking is the error code. Nothing else. % openssl version OpenSSL 1.0.2p 14 Aug 2018 % openssl ocsp 2>/dev/null % print $? 1 % openssl foo 2>/dev/null % print $? 0
With 1.1.1, both return 1, but so what, we know that it has oscp. Complaining about /dev/null : orig code had this. Why was that OK? > On Oct 13, 2018, at 2:35 PM, William A Rowe Jr <[email protected]> wrote: > > On Wed, Oct 10, 2018 at 12:27 PM <[email protected] <mailto:[email protected]>> > wrote: > Author: jim > Date: Wed Oct 10 17:27:33 2018 > New Revision: 1843478 > > URL: http://svn.apache.org/viewvc?rev=1843478&view=rev > <http://svn.apache.org/viewvc?rev=1843478&view=rev> > Log: > Better method... just check return status > > Modified: > httpd/test/framework/trunk/t/ssl/ocsp.t > > Modified: httpd/test/framework/trunk/t/ssl/ocsp.t > URL: > http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/ssl/ocsp.t?rev=1843478&r1=1843477&r2=1843478&view=diff > > <http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/ssl/ocsp.t?rev=1843478&r1=1843477&r2=1843478&view=diff> > ============================================================================== > --- httpd/test/framework/trunk/t/ssl/ocsp.t (original) > +++ httpd/test/framework/trunk/t/ssl/ocsp.t Wed Oct 10 17:27:33 2018 > @@ -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) { > > On Windows, /dev/null is invalid (output target nul, eg NUL). > > On every platform this is an always-fail noop, since `openssl ocsp` always > results in an error. Not enough arguments. You disabled this test on all > environments, please revert. > > One test without extraneous stdout garbage might be to test ( `$openssl ocsp > -help` !~ /Usage:/ ) ... in theory this would both succeed (success 0), eat > stdout, and there should be no Usage: instructions if the ocsp verb doesn't > exist. > > Thoughts? > >
