From 25569e007b6025f4ca89d89df33a3c32169567ef Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Mon, 30 Mar 2020 16:01:48 +0200 Subject: [PATCH] chore(transport): Upgrade rustls and base64 (#251) --- tonic/Cargo.toml | 6 +++--- tonic/src/transport/service/tls.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tonic/Cargo.toml b/tonic/Cargo.toml index d5466ae..61fdb72 100644 --- a/tonic/Cargo.toml +++ b/tonic/Cargo.toml @@ -47,7 +47,7 @@ futures-core = { version = "0.3", default-features = false } futures-util = { version = "0.3", default-features = false } tracing = "0.1" http = "0.2" -base64 = "0.10" +base64 = "0.11" percent-encoding = "2.0" tower-service = "0.3" @@ -73,8 +73,8 @@ tower-load = { version = "0.3", optional = true } tracing-futures = { version = "0.2", optional = true } # rustls -tokio-rustls = { version = "0.12", optional = true } -rustls-native-certs = { version = "0.1", optional = true } +tokio-rustls = { version = "0.13", optional = true } +rustls-native-certs = { version = "0.3", optional = true } [dev-dependencies] tokio = { version = "0.2", features = ["rt-core", "macros"] } diff --git a/tonic/src/transport/service/tls.rs b/tonic/src/transport/service/tls.rs index e6cd2d8..0de574d 100644 --- a/tonic/src/transport/service/tls.rs +++ b/tonic/src/transport/service/tls.rs @@ -50,12 +50,12 @@ impl TlsConnector { if let Some(identity) = identity { let (client_cert, client_key) = rustls_keys::load_identity(identity)?; - config.set_single_client_cert(client_cert, client_key); + config.set_single_client_cert(client_cert, client_key)?; } #[cfg(feature = "tls-roots")] { - config.root_store = rustls_native_certs::load_native_certs()?; + config.root_store = rustls_native_certs::load_native_certs().map_err(|(_, e)| e)?; } if let Some(cert) = ca_cert {