Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "boring-rustls-provider"
version = "5.0.0"
version = "6.0.0-dev.0"
authors = ["Jan Rüth <boring-rustls-provider@djiehmail.com>"]
edition = "2024"
license = "MIT"
Expand Down Expand Up @@ -35,7 +35,7 @@ fips-precompiled = ["fips"]

# Enable TLS 1.2 cipher suites (ECDHE-ECDSA and ECDHE-RSA with AES-GCM
# and ChaCha20-Poly1305). Without this feature only TLS 1.3 is available.
tls12 = ["rustls/tls12", "boring/prf"]
tls12 = ["boring/prf"]

# Enable debug logging of BoringSSL errors and provider internals via
# the `log` crate. Useful for diagnosing handshake failures.
Expand All @@ -47,18 +47,16 @@ boring = { version = ">=5.1, <6", default-features = false }
boring-sys = { version = ">=5.1, <6", default-features = false }
foreign-types = "0.5"
log = { version = "0.4.4", optional = true }
rustls = { version = "0.23", default-features = false }
rustls = { version = "0.24.0-dev.0", default-features = false }
rustls-pki-types = { version = "1" }
spki = "0.7"
spki = "0.8"
zeroize = "1"

[dev-dependencies]
env_logger = "0.11"
hex-literal = "1"
rcgen = "0.12"
rustls = { version = "0.23", features = ["std", "logging"] }
tokio = { version = "1.34", features = ["macros", "rt", "net", "io-util", "io-std"] }
tokio-rustls = { version = "0.26", default-features = false }
rcgen = "0.14"
rustls = { version = "0.24.0-dev.0", features = ["std", "log"] }
webpki-roots = { version = "1.0" }

[[example]]
Expand Down
10 changes: 4 additions & 6 deletions examples/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut root_store = rustls::RootCertStore::empty();
root_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());

let config =
rustls::ClientConfig::builder_with_provider(boring_rustls_provider::provider().into())
.with_safe_default_protocol_versions()
.map_err(|_| std::io::Error::other("failed selecting protocol versions"))?
.with_root_certificates(root_store)
.with_no_client_auth();
let config = rustls::ClientConfig::builder(boring_rustls_provider::provider().into())
.with_root_certificates(root_store)
.with_no_client_auth()
.map_err(|e| std::io::Error::other(format!("failed building client config: {e}")))?;

let server_name = "www.rust-lang.org"
.try_into()
Expand Down
Loading
Loading