# HG changeset patch # User Maxim Dounin <mdou...@mdounin.ru> # Date 1679148654 -10800 # Sat Mar 18 17:10:54 2023 +0300 # Node ID c6a91e9fa97e2c99ddaa26471364f2345837e698 # Parent 25c625a731909efe2978b1fd497e9bdda9217a35 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; _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel