(self)
| 3898 | |
| 3899 | @requires_tls_version('TLSv1_3') |
| 3900 | def test_tls1_3(self): |
| 3901 | client_context, server_context, hostname = testing_context() |
| 3902 | client_context.minimum_version = ssl.TLSVersion.TLSv1_3 |
| 3903 | with ThreadedEchoServer(context=server_context) as server: |
| 3904 | with client_context.wrap_socket(socket.socket(), |
| 3905 | server_hostname=hostname) as s: |
| 3906 | s.connect((HOST, server.port)) |
| 3907 | self.assertIn(s.cipher()[0], { |
| 3908 | 'TLS_AES_256_GCM_SHA384', |
| 3909 | 'TLS_CHACHA20_POLY1305_SHA256', |
| 3910 | 'TLS_AES_128_GCM_SHA256', |
| 3911 | }) |
| 3912 | self.assertEqual(s.version(), 'TLSv1.3') |
| 3913 | |
| 3914 | @requires_tls_version('TLSv1_2') |
| 3915 | @requires_tls_version('TLSv1') |
nothing calls this directly
no test coverage detected