diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-25 04:47:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 04:47:45 +0100 |
commit | ac2da1e9ff8ec7dbe3bfea07a493d5c8e705c1b6 (patch) | |
tree | 406cb187614e764d17602f6d65e96848ddd35724 /ext/websocket/lib.rs | |
parent | 9e575a286269c38c1af0a918a2a4ea4639a3004b (diff) |
Revert "chore: bump rustls-tokio-stream and rustls (#21955)" (#22097)
This reverts commit 971eb0e5e836cdeaaefc25b2bab4c6a6a9f8e213.
To unblock v1.40 release.
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r-- | ext/websocket/lib.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs index 60b0911b1..4b544b4f8 100644 --- a/ext/websocket/lib.rs +++ b/ext/websocket/lib.rs @@ -23,7 +23,6 @@ use deno_core::ToJsBuffer; use deno_net::raw::NetworkStream; use deno_tls::create_client_config; use deno_tls::rustls::ClientConfig; -use deno_tls::rustls::ClientConnection; use deno_tls::RootCertStoreProvider; use deno_tls::SocketUse; use http::header::CONNECTION; @@ -237,7 +236,8 @@ async fn handshake_http1_wss( ServerName::try_from(domain).map_err(|_| invalid_hostname(domain))?; let mut tls_connector = TlsStream::new_client_side( tcp_socket, - ClientConnection::new(tls_config.into(), dnsname).unwrap(), + tls_config.into(), + dnsname, NonZeroUsize::new(65536), ); // If we can bail on an http/1.1 ALPN mismatch here, we can avoid doing extra work @@ -261,11 +261,8 @@ async fn handshake_http2_wss( let dnsname = ServerName::try_from(domain).map_err(|_| invalid_hostname(domain))?; // We need to better expose the underlying errors here - let mut tls_connector = TlsStream::new_client_side( - tcp_socket, - ClientConnection::new(tls_config.into(), dnsname).unwrap(), - None, - ); + let mut tls_connector = + TlsStream::new_client_side(tcp_socket, tls_config.into(), dnsname, None); let handshake = tls_connector.handshake().await?; if handshake.alpn.is_none() { bail!("Didn't receive h2 alpn, aborting connection"); |