Skip to content

Commit

Permalink
chore(tls): Update to rustls 0.23 (#1676)
Browse files Browse the repository at this point in the history
Co-authored-by: Lucio Franco <[email protected]>
  • Loading branch information
tottoto and LucioFranco authored May 20, 2024
1 parent 31dbbca commit f9d19e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 2 additions & 3 deletions tonic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ gzip = ["dep:flate2"]
zstd = ["dep:zstd"]
default = ["transport", "codegen", "prost"]
prost = ["dep:prost"]
tls = ["dep:rustls-pki-types", "dep:rustls-pemfile", "transport", "dep:tokio-rustls", "dep:tokio", "tokio?/rt", "tokio?/macros"]
tls = ["dep:rustls-pemfile", "transport", "dep:tokio-rustls", "dep:tokio", "tokio?/rt", "tokio?/macros"]
tls-roots = ["tls-roots-common", "dep:rustls-native-certs"]
tls-roots-common = ["tls"]
tls-webpki-roots = ["tls-roots-common", "dep:webpki-roots"]
Expand Down Expand Up @@ -77,10 +77,9 @@ axum = {version = "0.6.9", default_features = false, optional = true}

# rustls
async-stream = { version = "0.3", optional = true }
rustls-pki-types = { version = "1.0", optional = true }
rustls-pemfile = { version = "2.0", optional = true }
rustls-native-certs = { version = "0.7", optional = true }
tokio-rustls = { version = "0.25", optional = true }
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12", "ring"], optional = true }
webpki-roots = { version = "0.26", optional = true }

# compression
Expand Down
7 changes: 5 additions & 2 deletions tonic/src/transport/service/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ use std::{
{fmt, sync::Arc},
};

use rustls_pki_types::{CertificateDer, PrivateKeyDer, ServerName};
use tokio::io::{AsyncRead, AsyncWrite};
use tokio_rustls::{
rustls::{server::WebPkiClientVerifier, ClientConfig, RootCertStore, ServerConfig},
rustls::{
pki_types::{CertificateDer, PrivateKeyDer, ServerName},
server::WebPkiClientVerifier,
ClientConfig, RootCertStore, ServerConfig,
},
TlsAcceptor as RustlsAcceptor, TlsConnector as RustlsConnector,
};

Expand Down

0 comments on commit f9d19e1

Please sign in to comment.