From 25b25293961f3791dde2f83352db093f3ebe6353 Mon Sep 17 00:00:00 2001 From: Jerome Gravel-Niquet Date: Mon, 9 Sep 2019 08:45:04 -0400 Subject: [PATCH] Update rustls, tokio-rustls and webpki across the board --- Cargo.toml | 2 +- actix-connect/Cargo.toml | 6 +++--- actix-connect/src/ssl/rustls.rs | 13 +++++-------- actix-server-config/Cargo.toml | 4 ++-- actix-server-config/src/lib.rs | 2 +- actix-server/Cargo.toml | 8 ++++---- actix-server/src/ssl/rustls.rs | 10 +++++----- 7 files changed, 21 insertions(+), 24 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index cc9e4596..797d7066 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,4 +38,4 @@ env_logger = "0.6" futures = "0.1.25" openssl = "0.10" tokio-tcp = "0.1" -tokio-openssl = "0.3" +tokio-openssl = "0.3" \ No newline at end of file diff --git a/actix-connect/Cargo.toml b/actix-connect/Cargo.toml index afa57a93..5bca2b02 100644 --- a/actix-connect/Cargo.toml +++ b/actix-connect/Cargo.toml @@ -51,9 +51,9 @@ openssl = { version="0.10", optional = true } tokio-openssl = { version="0.3", optional = true } #rustls -rustls = { version = "0.15.2", optional = true } -tokio-rustls = { version = "0.9.1", optional = true } -webpki = { version = "0.19", optional = true } +rustls = { version = "0.16.0", optional = true } +tokio-rustls = { version = "0.10.0", optional = true } +webpki = { version = "0.21", optional = true } [dev-dependencies] bytes = "0.4" diff --git a/actix-connect/src/ssl/rustls.rs b/actix-connect/src/ssl/rustls.rs index 9a518507..7d6f5720 100644 --- a/actix-connect/src/ssl/rustls.rs +++ b/actix-connect/src/ssl/rustls.rs @@ -5,10 +5,7 @@ use actix_codec::{AsyncRead, AsyncWrite}; use actix_service::{NewService, Service}; use futures::{future::ok, future::FutureResult, Async, Future, Poll}; use std::sync::Arc; -use tokio_rustls::{ - rustls::{ClientConfig, ClientSession}, - Connect, TlsConnector, TlsStream, -}; +use tokio_rustls::{client::TlsStream, rustls::ClientConfig, Connect, TlsConnector}; use webpki::DNSNameRef; use crate::{Address, Connection}; @@ -37,7 +34,7 @@ where connector: Arc, ) -> impl Service< Request = Connection, - Response = Connection>, + Response = Connection>, Error = std::io::Error, > { RustlsConnectorService { @@ -61,7 +58,7 @@ where U: AsyncRead + AsyncWrite + fmt::Debug, { type Request = Connection; - type Response = Connection>; + type Response = Connection>; type Error = std::io::Error; type Config = (); type Service = RustlsConnectorService; @@ -86,7 +83,7 @@ where U: AsyncRead + AsyncWrite + fmt::Debug, { type Request = Connection; - type Response = Connection>; + type Response = Connection>; type Error = std::io::Error; type Future = ConnectAsyncExt; @@ -114,7 +111,7 @@ impl Future for ConnectAsyncExt where U: AsyncRead + AsyncWrite + fmt::Debug, { - type Item = Connection>; + type Item = Connection>; type Error = std::io::Error; fn poll(&mut self) -> Poll { diff --git a/actix-server-config/Cargo.toml b/actix-server-config/Cargo.toml index 08af1acf..3e892742 100644 --- a/actix-server-config/Cargo.toml +++ b/actix-server-config/Cargo.toml @@ -33,6 +33,6 @@ futures = "0.1.25" tokio-io = "0.1.12" tokio-tcp = "0.1" tokio-openssl = { version="0.3.0", optional = true } -rustls = { version = "0.15.2", optional = true } -tokio-rustls = { version = "0.9.1", optional = true } +rustls = { version = "0.16.0", optional = true } +tokio-rustls = { version = "0.10.0", optional = true } tokio-uds = { version="0.2.5", optional = true } diff --git a/actix-server-config/src/lib.rs b/actix-server-config/src/lib.rs index 85f72bdb..fc5dac04 100644 --- a/actix-server-config/src/lib.rs +++ b/actix-server-config/src/lib.rs @@ -195,7 +195,7 @@ impl IoStream for tokio_openssl::SslStream { } #[cfg(any(feature = "rust-tls"))] -impl IoStream for tokio_rustls::TlsStream { +impl IoStream for tokio_rustls::server::TlsStream { #[inline] fn peer_addr(&self) -> Option { self.get_ref().0.peer_addr() diff --git a/actix-server/Cargo.toml b/actix-server/Cargo.toml index c7c40820..df060f35 100644 --- a/actix-server/Cargo.toml +++ b/actix-server/Cargo.toml @@ -65,10 +65,10 @@ openssl = { version="0.10", optional = true } tokio-openssl = { version="0.3", optional = true } # rustls -rustls = { version = "0.15.2", optional = true } -tokio-rustls = { version = "0.9.1", optional = true } -webpki = { version = "0.19", optional = true } -webpki-roots = { version = "0.16", optional = true } +rustls = { version = "0.16.0", optional = true } +tokio-rustls = { version = "0.10.0", optional = true } +webpki = { version = "0.21", optional = true } +webpki-roots = { version = "0.17", optional = true } [dev-dependencies] bytes = "0.4" diff --git a/actix-server/src/ssl/rustls.rs b/actix-server/src/ssl/rustls.rs index 151bbbd6..06edc0f5 100644 --- a/actix-server/src/ssl/rustls.rs +++ b/actix-server/src/ssl/rustls.rs @@ -4,9 +4,9 @@ use std::sync::Arc; use actix_service::{NewService, Service}; use futures::{future::ok, future::FutureResult, Async, Future, Poll}; -use rustls::{ServerConfig, ServerSession}; +use rustls::ServerConfig; use tokio_io::{AsyncRead, AsyncWrite}; -use tokio_rustls::{Accept, TlsAcceptor, TlsStream}; +use tokio_rustls::{server::TlsStream, Accept, TlsAcceptor}; use crate::counter::{Counter, CounterGuard}; use crate::ssl::MAX_CONN_COUNTER; @@ -41,7 +41,7 @@ impl Clone for RustlsAcceptor { impl NewService for RustlsAcceptor { type Request = Io; - type Response = Io, P>; + type Response = Io, P>; type Error = io::Error; type Config = SrvConfig; @@ -70,7 +70,7 @@ pub struct RustlsAcceptorService { impl Service for RustlsAcceptorService { type Request = Io; - type Response = Io, P>; + type Response = Io, P>; type Error = io::Error; type Future = RustlsAcceptorServiceFut; @@ -102,7 +102,7 @@ where } impl Future for RustlsAcceptorServiceFut { - type Item = Io, P>; + type Item = Io, P>; type Error = io::Error; fn poll(&mut self) -> Poll {