diff --git a/Cargo.lock b/Cargo.lock index 06cd19d..a781044 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1843,9 +1843,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" dependencies = [ "openssl-probe", "rustls-pemfile", diff --git a/Cargo.toml b/Cargo.toml index a1dd317..763a988 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ percent-encoding = { version = "2.3", optional = true } native-tls = { version = "0.2.5", optional = true } # feature rustls = { version = "0.23.5", default-features = false, features = ["ring", "logging", "std", "tls12"], optional = true } rustls-pemfile = { version = "2", optional = true } -rustls-native-certs = { version = "0.7", optional = true } +rustls-native-certs = { version = "0.8", optional = true } rustls-pki-types = { version = "1.7", optional = true } webpki-roots = { version = "0.26", optional = true } boring = { version = "4", optional = true } diff --git a/src/transport/smtp/client/tls.rs b/src/transport/smtp/client/tls.rs index cbf0b69..15b7b1c 100644 --- a/src/transport/smtp/client/tls.rs +++ b/src/transport/smtp/client/tls.rs @@ -390,11 +390,14 @@ impl TlsParametersBuilder { #[cfg(feature = "rustls-native-certs")] fn load_native_roots(store: &mut RootCertStore) -> Result<(), Error> { - let native_certs = rustls_native_certs::load_native_certs().map_err(error::tls)?; - let (added, ignored) = store.add_parsable_certificates(native_certs); + let rustls_native_certs::CertificateResult { certs, errors, .. } = + rustls_native_certs::load_native_certs(); + let errors_len = errors.len(); + + let (added, ignored) = store.add_parsable_certificates(certs); #[cfg(feature = "tracing")] tracing::debug!( - "loaded platform certs with {added} valid and {ignored} ignored (invalid) certs" + "loaded platform certs with {errors_len} failing to load, {added} valid and {ignored} ignored (invalid) certs" ); Ok(()) }