Basic communication over the TLS in TLS tunnel.
(self)
| 386 | |
| 387 | @pytest.mark.timeout(PER_TEST_TIMEOUT) |
| 388 | def test_tls_in_tls_tunnel(self) -> None: |
| 389 | """ |
| 390 | Basic communication over the TLS in TLS tunnel. |
| 391 | """ |
| 392 | self.start_destination_server() |
| 393 | self.start_proxy_server() |
| 394 | |
| 395 | sock = socket.create_connection( |
| 396 | (self.proxy_server.host, self.proxy_server.port) |
| 397 | ) |
| 398 | with self.client_context.wrap_socket( |
| 399 | sock, server_hostname="localhost" |
| 400 | ) as proxy_sock: |
| 401 | with SSLTransport( |
| 402 | proxy_sock, self.client_context, server_hostname="localhost" |
| 403 | ) as destination_sock: |
| 404 | assert destination_sock.version() is not None |
| 405 | destination_sock.send(sample_request()) |
| 406 | response = consume_socket(destination_sock) |
| 407 | validate_response(response) |
| 408 | |
| 409 | @pytest.mark.timeout(PER_TEST_TIMEOUT) |
| 410 | def test_wrong_sni_hint(self) -> None: |
nothing calls this directly
no test coverage detected