File: rustls-native-certs.diff

package info (click to toggle)
rust-actix-tls 3.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 380 kB
  • sloc: makefile: 2
file content (16 lines) | stat: -rw-r--r-- 583 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- a/src/connect/rustls_0_23.rs
+++ b/src/connect/rustls_0_23.rs
@@ -40,7 +40,12 @@ pub mod reexports {
 pub fn native_roots_cert_store() -> io::Result<tokio_rustls::rustls::RootCertStore> {
     let mut root_certs = tokio_rustls::rustls::RootCertStore::empty();
 
-    for cert in rustls_native_certs_07::load_native_certs()? {
+    let certs = rustls_native_certs_07::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();
     }