Skip to content

Commit

Permalink
Fix native-tls feature
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 2, 2023
1 parent 042840d commit 6e7ee97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ fn http_agent() -> Result<ureq::Agent> {
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)?);
}
}
Expand Down

0 comments on commit 6e7ee97

Please sign in to comment.