# HG changeset patch # User Maxim Dounin # Date 1679590189 -10800 # Node ID 8dec885fa3da2a81602ce60dfc6399edc767fab0 # Parent a78c32419f02d51c337c3f873f50bc849fd3b41c Tests: LibreSSL and BoringSSL session reuse with TLSv1.3. LibreSSL does not support session reuse with TLSv1.3 at all. BoringSSL with TLSv1.3 only supports session tickets, but not server-side session cache. diff --git a/ssl.t b/ssl.t --- a/ssl.t +++ b/ssl.t @@ -185,6 +185,8 @@ local $TODO = 'no TLSv1.3 sessions, old 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('/', 8085, $ctx), qr/^body r$/m, 'session reused'); @@ -211,8 +213,17 @@ like(get('/', 8086, $ctx), qr/^body \.$/ $ctx = get_ssl_context(); like(get('/id', 8085, $ctx), qr/^body (\w{64})?$/m, 'session id'); + +TODO: { +local $TODO = 'no TLSv1.3 sessions in LibreSSL' + if $t->has_module('LibreSSL') && test_tls13(); +local $TODO = 'no TLSv1.3 sessions ids in BoringSSL' + if $t->has_module('BoringSSL') && test_tls13(); + like(get('/id', 8085, $ctx), qr/^body \w{64}$/m, 'session id reused'); +} + unlike(http_get('/id'), qr/body \w/, 'session id no ssl'); like(get('/cipher', 8085), qr/^body [\w-]+$/m, 'cipher'); diff --git a/ssl_session_reuse.t b/ssl_session_reuse.t --- a/ssl_session_reuse.t +++ b/ssl_session_reuse.t @@ -170,14 +170,22 @@ local $TODO = 'no TLSv1.3 sessions, old 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(); is(test_reuse(8443), 1, 'tickets reused'); is(test_reuse(8444), 1, 'tickets and cache reused'); + +TODO: { +local $TODO = 'no TLSv1.3 session cache in BoringSSL' + if $t->has_module('BoringSSL') && test_tls13(); + is(test_reuse(8445), 1, 'cache shared reused'); is(test_reuse(8446), 1, 'cache builtin reused'); is(test_reuse(8447), 1, 'cache builtin size reused'); } +} is(test_reuse(8448), 0, 'cache none not reused'); is(test_reuse(8449), 0, 'cache off not reused');