You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2018/10/21 11:09:09 UTC
svn commit: r1844479 - /httpd/test/framework/trunk/t/ssl/ocsp.t
Author: rjung
Date: Sun Oct 21 11:09:09 2018
New Revision: 1844479
URL: http://svn.apache.org/viewvc?rev=1844479&view=rev
Log:
Fix success/failure checks for OpenSSL 1.1.1.
Handshake failures can also be signalled
later during SSL_read(). In these cases SSL_connect
seems to succeed and the alert will not become
part of the internal response generated by
IO::Socket::SSL.
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=1844479&r1=1844478&r2=1844479&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/ssl/ocsp.t (original)
+++ httpd/test/framework/trunk/t/ssl/ocsp.t Sun Oct 21 11:09:09 2018
@@ -17,8 +17,6 @@ my $url = '/index.html';
Apache::TestRequest::scheme('https');
Apache::TestRequest::module('ssl_ocsp');
-# Requires OpenSSL 1.1, can't find a simple way to test for 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 -commands 2>&1` !~ /ocsp/) {
@@ -32,8 +30,11 @@ my $r;
sok {
$r = GET $url, cert => undef;
+ my $message = $r->message() || '';
+ my $warning = $r->header('Client-Warning') || '';
print $r->as_string;
- $r->code != 200;
+ $r->code == 500 && $warning =~ 'Internal response' &&
+ $message =~ /alert handshake failure|read failed/;
};
sok {
@@ -44,7 +45,9 @@ sok {
sok {
$r = GET $url, cert => 'client_revoked';
+ my $message = $r->message() || '';
+ my $warning = $r->header('Client-Warning') || '';
print $r->as_string;
- $r->code != 200 && $r->as_string =~ "alert certificate revoked";
+ $r->code == 500 && $warning =~ 'Internal response' &&
+ $message =~ /alert certificate revoked|read failed/;
};
-