oa_gateway_testing::owp

Function connect_tls

Source
pub async fn connect_tls(
    url: &str,
    client_tls: ClientTls,
) -> Result<OwpWs, Error>
Expand description

As connect, for a wss:// URL from start_owp_tls_with, trusting the peer’s certificate per client_tls.

Returns an error rather than panicking on a failed TLS handshake, since tests assert on that failure (an untrusted certificate, a plaintext client against a TLS listener).

§Errors

Returns the underlying tungstenite/TLS error if the handshake fails.