From 6e7ee976e37245728c627607a5bd724fb493836c Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 2 Dec 2023 22:17:30 +0800 Subject: [PATCH] Fix native-tls feature --- src/common.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.rs b/src/common.rs index 8979548..b4668a0 100644 --- a/src/common.rs +++ b/src/common.rs @@ -606,7 +606,8 @@ fn http_agent() -> Result { let mut tls_builder = native_tls_crate::TlsConnector::builder(); if let Some(ca_bundle) = tls_ca_bundle() { let mut reader = io::BufReader::new(File::open(ca_bundle)?); - for cert in rustls_pemfile::certs(&mut reader)? { + for cert in rustls_pemfile::certs(&mut reader) { + let cert = cert?; tls_builder.add_root_certificate(native_tls_crate::Certificate::from_pem(&cert)?); } }