Skip to content

Commit 5e20ca1

Browse files
authored
Merge pull request #293 from compio-rs/dependabot/cargo/rustls-native-certs-0.8.0
build(deps): update rustls-native-certs requirement from 0.7.0 to 0.8.0
2 parents 72664b6 + b0cc53c commit 5e20ca1

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ os_pipe = "1.1.4"
5454
paste = "1.0.14"
5555
rand = "0.8.5"
5656
rustls = { version = "0.23.1", default-features = false }
57+
rustls-native-certs = "0.8.0"
5758
slab = "0.4.9"
5859
socket2 = "0.5.6"
5960
tempfile = "3.8.1"

compio-quic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ compio-runtime = { workspace = true, features = ["time"] }
2525
quinn-proto = "0.11.3"
2626
rustls = { workspace = true }
2727
rustls-platform-verifier = { version = "0.3.3", optional = true }
28-
rustls-native-certs = { version = "0.7.1", optional = true }
28+
rustls-native-certs = { workspace = true, optional = true }
2929
webpki-roots = { version = "0.26.3", optional = true }
3030
h3 = { version = "0.0.6", optional = true }
3131

compio-quic/src/builder.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,16 @@ impl ClientBuilder<rustls::RootCertStore> {
2626
#[cfg(feature = "native-certs")]
2727
pub fn new_with_native_certs() -> io::Result<Self> {
2828
let mut roots = rustls::RootCertStore::empty();
29-
roots.add_parsable_certificates(rustls_native_certs::load_native_certs()?);
29+
let mut certs = rustls_native_certs::load_native_certs();
30+
if certs.certs.is_empty() {
31+
return Err(io::Error::other(
32+
certs
33+
.errors
34+
.pop()
35+
.expect("certs and errors should not be both empty"),
36+
));
37+
}
38+
roots.add_parsable_certificates(certs.certs);
3039
Ok(ClientBuilder(roots))
3140
}
3241

compio-tls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ compio-runtime = { workspace = true }
3131
compio-macros = { workspace = true }
3232

3333
rustls = { workspace = true, default-features = false, features = ["ring"] }
34-
rustls-native-certs = "0.7.0"
34+
rustls-native-certs = { workspace = true }
3535

3636
[features]
3737
default = ["native-tls"]

0 commit comments

Comments
 (0)