[nginx-tests] Tests: guarded ssl_stapling.t for old OpenSSL vers...

Maxim Dounin mdounin at mdounin.ru
Sun May 5 21:05:01 UTC 2024


details:   http://freenginx.org/hg/nginx-tests/rev/f3573393f36f
branches:  
changeset: 1972:f3573393f36f
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon May 06 00:04:22 2024 +0300
description:
Tests: guarded ssl_stapling.t for old OpenSSL versions.

Stapling requires the certificate status TLS extension.  It is implemented
in OpenSSL 0.9.8h and available if TLS extensions support is explicitly
configured, and by default since 0.9.8j.

To properly test if stapling is available, OpenSSL version is checked,
and SNI availability is checked to ensure TLS extensions support is
compiled in.

diffstat:

 ssl_stapling.t |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (17 lines):

diff --git a/ssl_stapling.t b/ssl_stapling.t
--- a/ssl_stapling.t
+++ b/ssl_stapling.t
@@ -32,7 +32,12 @@ plan(skip_all => 'Net::SSLeay too old') 
 eval { defined &IO::Socket::SSL::SSL_OCSP_TRY_STAPLE or die; };
 plan(skip_all => 'IO::Socket::SSL too old') if $@;
 
-plan(skip_all => 'no OCSP stapling') if $t->has_module('BoringSSL');
+plan(skip_all => 'no OCSP stapling')
+	if $t->has_module('BoringSSL');
+plan(skip_all => 'no OCSP stapling')
+	if $t->has_module('OpenSSL') and not $t->has_feature('openssl:0.9.8h');
+plan(skip_all => 'no OCSP stapling')
+	if not $t->has_module('sni');
 
 $t->plan(10)->write_file_expand('nginx.conf', <<'EOF');
 



More information about the nginx-devel mailing list