Welcome! Log In Create A New Profile

Advanced

[PATCH 12 of 20] Tests: fixed ssl_session_ticket_key.t with LibreSSL and TLSv1.3

Maxim Dounin
March 18, 2023 10:20AM
# HG changeset patch
# User Maxim Dounin <mdounin@mdounin.ru>
# Date 1679148620 -10800
# Sat Mar 18 17:10:20 2023 +0300
# Node ID 25c625a731909efe2978b1fd497e9bdda9217a35
# Parent 7dec25ecd3db606258647bd2ce2bca15e793accb
Tests: fixed ssl_session_ticket_key.t with LibreSSL and TLSv1.3.

LibreSSL does not support session reuse with TLSv1.3.

diff --git a/ssl_session_ticket_key.t b/ssl_session_ticket_key.t
--- a/ssl_session_ticket_key.t
+++ b/ssl_session_ticket_key.t
@@ -96,6 +96,10 @@ select undef, undef, undef, 0.5;
is(get_ticket_key_name(), $key, 'ticket key match');

select undef, undef, undef, 2.5;
+
+local $TODO = 'no TLSv1.3 sessions in LibreSSL'
+ if $t->has_module('LibreSSL') && test_tls13();
+
cmp_ok(get_ticket_key_name(), 'ne', $key, 'ticket key next');

###############################################################################
@@ -107,7 +111,7 @@ sub get_ticket_key_name {
next:
# tag(10) | len{2} | OCTETSTRING(4) | len{2} | ticket(key_name|..)
$asn =~ /\xaa\x81($any)\x04\x81($any)($any{16})/g;
- return if !defined $3;
+ return '' if !defined $3;
goto next if unpack("C", $1) - unpack("C", $2) != 3;
my $key = unpack "H*", $3;
Test::Nginx::log_core('||', "ticket key: $key");
@@ -126,6 +130,11 @@ EOF
Net::SSLeay::get_session($ssl);
}

+sub test_tls13 {
+ my ($s, $ssl) = get_ssl_socket();
+ return (Net::SSLeay::version($ssl) > 0x303);
+}
+
sub get_ssl_socket {
my $s = IO::Socket::INET->new('127.0.0.1:' . port(8080));
my $ctx = Net::SSLeay::CTX_new() or die("Failed to create SSL_CTX $!");
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 00 of 20] tests suite fixes for TLSv1.3

Maxim Dounin 534 March 18, 2023 10:18AM

[PATCH 03 of 20] Tests: separate SSL session reuse tests in mail

Maxim Dounin 154 March 18, 2023 10:18AM

Re: [PATCH 03 of 20] Tests: separate SSL session reuse tests in mail

Sergey Kandaurov 130 March 22, 2023 05:22AM

Re: [PATCH 03 of 20] Tests: separate SSL session reuse tests in mail

Maxim Dounin 122 March 23, 2023 10:18AM

Re: [PATCH 03 of 20] Tests: separate SSL session reuse tests in mail

Sergey Kandaurov 144 March 22, 2023 05:48AM

Re: [PATCH 03 of 20] Tests: separate SSL session reuse tests in mail

Maxim Dounin 129 March 23, 2023 10:16AM

Re: [PATCH 03 of 20] Tests: separate SSL session reuse tests in mail

Sergey Kandaurov 124 March 23, 2023 12:00PM

[PATCH 01 of 20] Tests: separate SSL session reuse tests

Maxim Dounin 203 March 18, 2023 10:18AM

Re: [PATCH 01 of 20] Tests: separate SSL session reuse tests

Sergey Kandaurov 189 March 22, 2023 04:58AM

Re: [PATCH 01 of 20] Tests: separate SSL session reuse tests

Maxim Dounin 131 March 23, 2023 10:12AM

Re: [PATCH 01 of 20] Tests: separate SSL session reuse tests

Sergey Kandaurov 123 March 23, 2023 12:00PM

Re: [PATCH 01 of 20] Tests: separate SSL session reuse tests

Maxim Dounin 172 March 23, 2023 01:26PM

Re: [PATCH 01 of 20] Tests: separate SSL session reuse tests

Sergey Kandaurov 185 March 24, 2023 08:40AM

[PATCH 08 of 20] Tests: enabled session reuse via TLS session tickets

Maxim Dounin 130 March 18, 2023 10:20AM

[PATCH 07 of 20] Tests: BoringSSL does not provide session ids with TLSv1.3

Maxim Dounin 139 March 18, 2023 10:20AM

[PATCH 09 of 20] Tests: restored proper port numbers in ssl_sni_sessions.t

Maxim Dounin 132 March 18, 2023 10:20AM

[PATCH 10 of 20] Tests: disabled ssl_sni_sessions.t with LibreSSL and BoringSSL

Maxim Dounin 149 March 18, 2023 10:20AM

[PATCH 05 of 20] Tests: separate SSL session reuse tests in stream

Maxim Dounin 144 March 18, 2023 10:20AM

Re: [PATCH 05 of 20] Tests: separate SSL session reuse tests in stream

Sergey Kandaurov 141 March 22, 2023 05:56AM

Re: [PATCH 05 of 20] Tests: separate SSL session reuse tests in stream

Maxim Dounin 122 March 23, 2023 10:18AM

[PATCH 06 of 20] Tests: LibreSSL and BoringSSL session reuse with TLSv1.3 in mail

Maxim Dounin 131 March 18, 2023 10:20AM

Re: [PATCH 06 of 20] Tests: LibreSSL and BoringSSL session reuse with TLSv1.3 in mail

Sergey Kandaurov 129 March 22, 2023 06:00AM

Re: [PATCH 06 of 20] Tests: LibreSSL and BoringSSL session reuse with TLSv1.3 in mail

Maxim Dounin 118 March 23, 2023 10:18AM

[PATCH 12 of 20] Tests: fixed ssl_session_ticket_key.t with LibreSSL and TLSv1.3

Maxim Dounin 112 March 18, 2023 10:20AM

[PATCH 13 of 20] Tests: fixed ssl_sni.t with LibreSSL and TLSv1.3

Maxim Dounin 170 March 18, 2023 10:20AM

[PATCH 11 of 20] Tests: fixed proxy_ssl.t with LibreSSL and TLSv1.3

Maxim Dounin 161 March 18, 2023 10:20AM

[PATCH 14 of 20] Tests: LibreSSL certificate negotiation with TLSv1.3

Maxim Dounin 200 March 18, 2023 10:20AM

[PATCH 15 of 20] Tests: LibreSSL does not send CA lists with TLSv1.3

Maxim Dounin 160 March 18, 2023 10:20AM

Re: [PATCH 15 of 20] Tests: LibreSSL does not send CA lists with TLSv1.3

Sergey Kandaurov 144 March 22, 2023 06:40AM

[PATCH 16 of 20] Tests: fixed stream_proxy_ssl.t with LibreSSL and TLSv1.3

Maxim Dounin 193 March 18, 2023 10:20AM

[PATCH 18 of 20] Tests: cleaned up ssl_ocsp.t

Maxim Dounin 159 March 18, 2023 10:20AM

[PATCH 20 of 20] Tests: fixed ssl_ocsp.t with LibreSSL and TLSv1.3

Maxim Dounin 165 March 18, 2023 10:20AM

Re: [PATCH 20 of 20] Tests: fixed ssl_ocsp.t with LibreSSL and TLSv1.3

Sergey Kandaurov 152 March 22, 2023 07:12AM

Re: [PATCH 20 of 20] Tests: fixed ssl_ocsp.t with LibreSSL and TLSv1.3

Maxim Dounin 134 March 23, 2023 10:20AM

[PATCH 19 of 20] Tests: removed multiple server certificates from ssl_ocsp.t

Maxim Dounin 150 March 18, 2023 10:20AM

Re: [PATCH 19 of 20] Tests: removed multiple server certificates from ssl_ocsp.t

Sergey Kandaurov 135 March 22, 2023 07:06AM

Re: [PATCH 19 of 20] Tests: removed multiple server certificates from ssl_ocsp.t

Maxim Dounin 126 March 23, 2023 10:18AM

[PATCH 17 of 20] Tests: fixed stream_ssl_variables.t.t with LibreSSL and TLSv1.3

Maxim Dounin 138 March 18, 2023 10:20AM

Re: [PATCH 00 of 20] tests suite fixes for TLSv1.3

Sergey Kandaurov 119 March 22, 2023 07:44AM

Re: [PATCH 00 of 20] tests suite fixes for TLSv1.3

Maxim Dounin 143 March 23, 2023 10:20AM

Re: [PATCH 00 of 20] tests suite fixes for TLSv1.3

Sergey Kandaurov 119 March 23, 2023 12:02PM

Re: [PATCH 00 of 20] tests suite fixes for TLSv1.3

Maxim Dounin 116 March 23, 2023 12:54PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 235
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready