diff --git a/transports/websocket/Cargo.toml b/transports/websocket/Cargo.toml index dde04af187c..af8a44507bb 100644 --- a/transports/websocket/Cargo.toml +++ b/transports/websocket/Cargo.toml @@ -10,17 +10,15 @@ keywords = ["peer-to-peer", "libp2p", "networking"] categories = ["network-programming", "asynchronous"] [dependencies] -async-tls = "0.11.0" +futures-rustls = "0.21" either = "1.5.3" futures = "0.3.1" libp2p-core = { version = "0.27.0", path = "../../core" } log = "0.4.8" quicksink = "0.1" -rustls = "0.19.0" rw-stream-sink = "0.2.0" soketto = { version = "0.4.1", features = ["deflate"] } url = "2.1" -webpki = "0.21" webpki-roots = "0.21" [dev-dependencies] diff --git a/transports/websocket/src/framed.rs b/transports/websocket/src/framed.rs index 718f7f95c5a..d5bd63b82c6 100644 --- a/transports/websocket/src/framed.rs +++ b/transports/websocket/src/framed.rs @@ -18,7 +18,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -use async_tls::{client, server}; +use futures_rustls::{webpki, client, server}; use crate::{error::Error, tls}; use either::Either; use futures::{future::BoxFuture, prelude::*, ready, stream::BoxStream}; @@ -310,7 +310,7 @@ where if use_tls { // begin TLS session let dns_name = dns_name.expect("for use_tls we have checked that dns_name is some"); trace!("starting TLS handshake with {}", address); - let stream = self.tls_config.client.connect(&dns_name, stream) + let stream = self.tls_config.client.connect(dns_name.as_ref(), stream) .map_err(|e| { debug!("TLS handshake with {} failed: {}", address, e); Error::Tls(tls::Error::from(e)) diff --git a/transports/websocket/src/tls.rs b/transports/websocket/src/tls.rs index 7ffdd057a38..3c224f1eca6 100644 --- a/transports/websocket/src/tls.rs +++ b/transports/websocket/src/tls.rs @@ -18,7 +18,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -use async_tls::{TlsConnector, TlsAcceptor}; +use futures_rustls::{rustls, webpki, TlsConnector, TlsAcceptor}; use std::{fmt, io, sync::Arc}; /// TLS configuration.