Skip to content

Commit

Permalink
chore(transport): Upgrade rustls and base64 (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
repi authored Mar 30, 2020
1 parent cfd59db commit 25569e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tonic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions tonic/src/transport/service/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 25569e0

Please sign in to comment.