Skip to content

Commit

Permalink
Update to rustls-native-certs 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sdroege committed Sep 4, 2024
1 parent a1f9d99 commit 9730873
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock.msrv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ version = "1.0.1"

[dependencies.rustls-native-certs]
optional = true
version = "0.7"
version = "0.8"

[dependencies.webpki-roots]
optional = true
Expand Down
6 changes: 5 additions & 1 deletion src/tokio/rustls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ where

#[cfg(feature = "tokio-rustls-native-certs")]
{
let native_certs = rustls_native_certs::load_native_certs()?;
let mut native_certs = rustls_native_certs::load_native_certs();
if let Some(err) = native_certs.errors.drain(..).next() {
return Err(std::io::Error::new(std::io::ErrorKind::Other, err).into());
}
let native_certs = native_certs.certs;
let total_number = native_certs.len();
let (number_added, number_ignored) =
root_store.add_parsable_certificates(native_certs);
Expand Down

0 comments on commit 9730873

Please sign in to comment.