Skip to content

Commit

Permalink
feat: upgrade to rustls 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Jun 3, 2024
1 parent c7db546 commit c733eb7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ features = [
]

[features]
default = ["default-tls", "charset", "http2", "macos-system-configuration"]
default = ["rustls-tls", "charset", "http2", "macos-system-configuration"]

# Note: this doesn't enable the 'native-tls' feature, which adds specific
# functionality for it.
Expand Down Expand Up @@ -134,10 +134,10 @@ native-tls-crate = { version = "0.2.10", optional = true, package = "native-tls"
tokio-native-tls = { version = "0.3.0", optional = true }

# rustls-tls
hyper-rustls = { version = "0.26.0", default-features = false, optional = true }
rustls = { version = "0.22.2", optional = true }
hyper-rustls = { version = "0.27.0", default-features = false, optional = true, features = ["http1", "http2", "native-tokio", "ring", "tls12"] }
rustls = { version = "0.23.4", optional = true, default-features = false, features = ["std", "ring", "tls12"] }
rustls-pki-types = { version = "1.1.0", features = ["alloc"] ,optional = true }
tokio-rustls = { version = "0.25", optional = true }
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["ring", "tls12"] }
webpki-roots = { version = "0.26.0", optional = true }
rustls-native-certs = { version = "0.7", optional = true }

Expand Down
5 changes: 4 additions & 1 deletion src/async_impl/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,11 @@ impl ClientBuilder {
}

// Build TLS config
let provider = Arc::new(rustls::crypto::ring::default_provider());
let config_builder =
rustls::ClientConfig::builder_with_protocol_versions(&versions)
rustls::ClientConfig::builder_with_provider(provider)
.with_protocol_versions(&versions)
.map_err(|_| crate::error::builder("invalid TLS versions"))?
.with_root_certificates(root_cert_store);

// Finalize TLS config
Expand Down

0 comments on commit c733eb7

Please sign in to comment.