(self)
| 4183 | |
| 4184 | @requires_tls_version('TLSv1_3') |
| 4185 | def test_tls1_3(self): |
| 4186 | client_context, server_context, hostname = testing_context() |
| 4187 | client_context.minimum_version = ssl.TLSVersion.TLSv1_3 |
| 4188 | with ThreadedEchoServer(context=server_context) as server: |
| 4189 | with client_context.wrap_socket(socket.socket(), |
| 4190 | server_hostname=hostname) as s: |
| 4191 | s.connect((HOST, server.port)) |
| 4192 | self.assertIn(s.cipher()[0], { |
| 4193 | 'TLS_AES_256_GCM_SHA384', |
| 4194 | 'TLS_CHACHA20_POLY1305_SHA256', |
| 4195 | 'TLS_AES_128_GCM_SHA256', |
| 4196 | }) |
| 4197 | self.assertEqual(s.version(), 'TLSv1.3') |
| 4198 | |
| 4199 | @requires_tls_version('TLSv1_2') |
| 4200 | @requires_tls_version('TLSv1') |
nothing calls this directly
no test coverage detected