comparison ssl_session_ticket_key.t @ 1869:5c50786e5da9

Tests: unbreak ssl_session_ticket_key.t with old IO::Socket::SSL. Once ssl_session_ticket_key.t was rewritten using IO::Socket::SSL, it requires SSL_session_key and TLSv1.3 session reuse support checks. Although SSL_session_key has been introduced in IO::Socket::SSL 1.965, further improvements appeared in 2.030 are needed for tests to work.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 23 May 2023 16:29:58 +0400
parents 0e1865aa9b33
children c924ae8d7104
comparison
equal deleted inserted replaced
1868:d570dbcad925 1869:5c50786e5da9
22 select STDERR; $| = 1; 22 select STDERR; $| = 1;
23 select STDOUT; $| = 1; 23 select STDOUT; $| = 1;
24 24
25 eval { require Net::SSLeay; die if $Net::SSLeay::VERSION < 1.86; }; 25 eval { require Net::SSLeay; die if $Net::SSLeay::VERSION < 1.86; };
26 plan(skip_all => 'Net::SSLeay version => 1.86 required') if $@; 26 plan(skip_all => 'Net::SSLeay version => 1.86 required') if $@;
27 eval { require IO::Socket::SSL; die if $IO::Socket::SSL::VERSION < 2.030; };
28 plan(skip_all => 'IO::Socket::SSL version => 2.030 required') if $@;
27 29
28 my $t = Test::Nginx->new()->has(qw/http http_ssl socket_ssl/) 30 my $t = Test::Nginx->new()->has(qw/http http_ssl socket_ssl/)
29 ->has_daemon('openssl')->plan(2) 31 ->has_daemon('openssl')->plan(2)
30 ->write_file_expand('nginx.conf', <<'EOF'); 32 ->write_file_expand('nginx.conf', <<'EOF');
31 33
95 select undef, undef, undef, 0.5; 97 select undef, undef, undef, 0.5;
96 is(get_ticket_key_name(), $key, 'ticket key match'); 98 is(get_ticket_key_name(), $key, 'ticket key match');
97 99
98 select undef, undef, undef, 2.5; 100 select undef, undef, undef, 2.5;
99 101
102 local $TODO = 'no TLSv1.3 sessions, old Net::SSLeay'
103 if $Net::SSLeay::VERSION < 1.88 && test_tls13();
104 local $TODO = 'no TLSv1.3 sessions, old IO::Socket::SSL'
105 if $IO::Socket::SSL::VERSION < 2.061 && test_tls13();
100 local $TODO = 'no TLSv1.3 sessions in LibreSSL' 106 local $TODO = 'no TLSv1.3 sessions in LibreSSL'
101 if $t->has_module('LibreSSL') && test_tls13(); 107 if $t->has_module('LibreSSL') && test_tls13();
102 108
103 cmp_ok(get_ticket_key_name(), 'ne', $key, 'ticket key next'); 109 cmp_ok(get_ticket_key_name(), 'ne', $key, 'ticket key next');
104 110