diff ssl_session_ticket_key.t @ 1971:ab45ee8011df

Tests: guarded session ticket tests for old OpenSSL versions. Much like SNI support, TLS session tickets are available starting with OpenSSL 0.9.8f if TLS extensions support is explicitly configured, and enabled by default since 0.9.8j. As such, SNI availability is checked to ensure TLS extensions support is compiled in. Additionally, the ssl_session_ticket_key.t tests for automatic ticket key rotation, which uses session ticket key callback, as introduced in OpenSSL 0.9.8h.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 06 May 2024 00:03:16 +0300
parents c924ae8d7104
children
line wrap: on
line diff
--- a/ssl_session_ticket_key.t
+++ b/ssl_session_ticket_key.t
@@ -27,7 +27,7 @@ plan(skip_all => 'Net::SSLeay version =>
 eval { require IO::Socket::SSL; die if $IO::Socket::SSL::VERSION < 2.030; };
 plan(skip_all => 'IO::Socket::SSL version => 2.030 required') if $@;
 
-my $t = Test::Nginx->new()->has(qw/http http_ssl socket_ssl/)
+my $t = Test::Nginx->new()->has(qw/http http_ssl tickets socket_ssl/)
 	->has_daemon('openssl')->plan(2)
 	->write_file_expand('nginx.conf', <<'EOF');
 
@@ -99,6 +99,8 @@ is(get_ticket_key_name(), $key, 'ticket 
 
 select undef, undef, undef, 2.5;
 
+local $TODO = 'no ticket key callback'
+	if $t->has_module('OpenSSL') and not $t->has_feature('openssl:0.9.8h');
 local $TODO = 'no TLSv1.3 sessions, old Net::SSLeay'
 	if $Net::SSLeay::VERSION < 1.88 && test_tls13();
 local $TODO = 'no TLSv1.3 sessions, old IO::Socket::SSL'