diff --git a/actix-tls/src/connect/rustls_0_22.rs b/actix-tls/src/connect/rustls_0_22.rs index 7db1c7d8..515af016 100644 --- a/actix-tls/src/connect/rustls_0_22.rs +++ b/actix-tls/src/connect/rustls_0_22.rs @@ -40,7 +40,12 @@ pub mod reexports { pub fn native_roots_cert_store() -> io::Result { let mut root_certs = tokio_rustls::rustls::RootCertStore::empty(); - for cert in rustls_native_certs_07::load_native_certs()? { + let certs = rustls_native_certs_08::load_native_certs(); + if let Some(err) = certs.errors.into_iter().next() { + return Err(io::Error::other(err)); + } + + for cert in certs.certs { root_certs.add(cert).unwrap(); }