# HG changeset patch # User Maxim Dounin # Date 1679590215 -10800 # Node ID db6fd9184fa097c67006fe726d922731e4acc1de # Parent 0381a0a212e1791bca04455d04d406aa66689390 Tests: fixed ssl_sni.t with LibreSSL and TLSv1.3. LibreSSL does not support session reuse with TLSv1.3. diff --git a/ssl_sni.t b/ssl_sni.t --- a/ssl_sni.t +++ b/ssl_sni.t @@ -148,9 +148,13 @@ my $ctx = new IO::Socket::SSL::SSL_Conte like(get('/', 'localhost', 8081, $ctx), qr/^\.:localhost$/m, 'ssl server name'); -SKIP: { -skip 'no TLS 1.3 sessions', 1 if get('/protocol', 'localhost') =~ /TLSv1.3/ - && ($Net::SSLeay::VERSION < 1.88 || $IO::Socket::SSL::VERSION < 2.061); +TODO: { +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' + if $IO::Socket::SSL::VERSION < 2.061 && test_tls13(); +local $TODO = 'no TLSv1.3 sessions in LibreSSL' + if $t->has_module('LibreSSL') && test_tls13(); like(get('/', 'localhost', 8081, $ctx), qr/^r:localhost$/m, 'ssl server name - reused'); @@ -159,6 +163,10 @@ like(get('/', 'localhost', 8081, $ctx), ############################################################################### +sub test_tls13 { + get('/protocol', 'localhost') =~ /TLSv1.3/; +} + sub get_ssl_socket { my ($host, $port, $ctx) = @_; my $s;