Mercurial > hg > nginx-tests
comparison mail_ssl_session_reuse.t @ 1832:2e541778e5d8
Tests: LibreSSL and BoringSSL session reuse with TLSv1.3 in mail.
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.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 23 Mar 2023 19:49:53 +0300 |
parents | f6d1f82f314b |
children | ce4a06d72256 |
comparison
equal
deleted
inserted
replaced
1831:f6d1f82f314b | 1832:2e541778e5d8 |
---|---|
137 # - only builtin cache | 137 # - only builtin cache |
138 # - only builtin cache with explicitly configured size | 138 # - only builtin cache with explicitly configured size |
139 # - only cache none | 139 # - only cache none |
140 # - only cache off | 140 # - only cache off |
141 | 141 |
142 TODO: { | |
143 local $TODO = 'no TLSv1.3 sessions in LibreSSL' | |
144 if $t->has_module('LibreSSL') && test_tls13(); | |
145 | |
142 is(test_reuse(8993), 1, 'tickets reused'); | 146 is(test_reuse(8993), 1, 'tickets reused'); |
143 is(test_reuse(8994), 1, 'tickets and cache reused'); | 147 is(test_reuse(8994), 1, 'tickets and cache reused'); |
148 | |
149 TODO: { | |
150 local $TODO = 'no TLSv1.3 session cache in BoringSSL' | |
151 if $t->has_module('BoringSSL') && test_tls13(); | |
152 | |
144 is(test_reuse(8995), 1, 'cache shared reused'); | 153 is(test_reuse(8995), 1, 'cache shared reused'); |
145 is(test_reuse(8996), 1, 'cache builtin reused'); | 154 is(test_reuse(8996), 1, 'cache builtin reused'); |
146 is(test_reuse(8997), 1, 'cache builtin size reused'); | 155 is(test_reuse(8997), 1, 'cache builtin size reused'); |
156 | |
157 } | |
158 } | |
159 | |
147 is(test_reuse(8998), 0, 'cache none not reused'); | 160 is(test_reuse(8998), 0, 'cache none not reused'); |
148 is(test_reuse(8999), 0, 'cache off not reused'); | 161 is(test_reuse(8999), 0, 'cache off not reused'); |
149 | 162 |
150 ############################################################################### | 163 ############################################################################### |
164 | |
165 sub test_tls13 { | |
166 my ($s, $ssl) = get_ssl_socket(8993); | |
167 return (Net::SSLeay::version($ssl) > 0x303); | |
168 } | |
151 | 169 |
152 sub test_reuse { | 170 sub test_reuse { |
153 my ($port) = @_; | 171 my ($port) = @_; |
154 my ($s, $ssl) = get_ssl_socket($port); | 172 my ($s, $ssl) = get_ssl_socket($port); |
155 Net::SSLeay::read($ssl); | 173 Net::SSLeay::read($ssl); |