Mercurial > hg > nginx-tests
comparison stream_ssl_session_reuse.t @ 1834:df96e9d6c095
Tests: LibreSSL and BoringSSL session reuse with TLSv1.3 in stream.
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:57 +0300 |
parents | fd9d077fee02 |
children | dbb7561a9441 |
comparison
equal
deleted
inserted
replaced
1833:fd9d077fee02 | 1834:df96e9d6c095 |
---|---|
142 # - only builtin cache | 142 # - only builtin cache |
143 # - only builtin cache with explicitly configured size | 143 # - only builtin cache with explicitly configured size |
144 # - only cache none | 144 # - only cache none |
145 # - only cache off | 145 # - only cache off |
146 | 146 |
147 TODO: { | |
148 local $TODO = 'no TLSv1.3 sessions in LibreSSL' | |
149 if $t->has_module('LibreSSL') && test_tls13(); | |
150 | |
147 is(test_reuse(8443), 1, 'tickets reused'); | 151 is(test_reuse(8443), 1, 'tickets reused'); |
148 is(test_reuse(8444), 1, 'tickets and cache reused'); | 152 is(test_reuse(8444), 1, 'tickets and cache reused'); |
153 | |
154 TODO: { | |
155 local $TODO = 'no TLSv1.3 session cache in BoringSSL' | |
156 if $t->has_module('BoringSSL') && test_tls13(); | |
157 | |
149 is(test_reuse(8445), 1, 'cache shared reused'); | 158 is(test_reuse(8445), 1, 'cache shared reused'); |
150 is(test_reuse(8446), 1, 'cache builtin reused'); | 159 is(test_reuse(8446), 1, 'cache builtin reused'); |
151 is(test_reuse(8447), 1, 'cache builtin size reused'); | 160 is(test_reuse(8447), 1, 'cache builtin size reused'); |
161 | |
162 } | |
163 } | |
164 | |
152 is(test_reuse(8448), 0, 'cache none not reused'); | 165 is(test_reuse(8448), 0, 'cache none not reused'); |
153 is(test_reuse(8449), 0, 'cache off not reused'); | 166 is(test_reuse(8449), 0, 'cache off not reused'); |
154 | 167 |
155 ############################################################################### | 168 ############################################################################### |
169 | |
170 sub test_tls13 { | |
171 my ($s, $ssl) = get_ssl_socket(8443); | |
172 return (Net::SSLeay::version($ssl) > 0x303); | |
173 } | |
156 | 174 |
157 sub test_reuse { | 175 sub test_reuse { |
158 my ($port) = @_; | 176 my ($port) = @_; |
159 my ($s, $ssl) = get_ssl_socket($port); | 177 my ($s, $ssl) = get_ssl_socket($port); |
160 Net::SSLeay::write($ssl, "GET / HTTP/1.0$CRLF$CRLF"); | 178 Net::SSLeay::write($ssl, "GET / HTTP/1.0$CRLF$CRLF"); |