Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
swap out native-rls for rust impl
Browse files Browse the repository at this point in the history
  • Loading branch information
caesay committed Mar 2, 2024
1 parent b92fa93 commit 0814891
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 145 deletions.
228 changes: 91 additions & 137 deletions for-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions for-rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ rpath = false # disable rpath
[dependencies]
anyhow = "1.0"
log = "0.4"
native-tls = "0.2"
ureq = { version = "2.9", default-features = false, features = [
"native-tls",
"gzip",
] }
ureq = "2.9"
url = "2.5"
semver = "1.0"
xml = "0.8"
Expand Down
7 changes: 4 additions & 3 deletions for-rust/src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ pub fn download_url_as_string(url: &str) -> Result<String> {
}

fn get_download_agent() -> Result<ureq::Agent> {
let tls_builder = native_tls::TlsConnector::builder();
let tls_connector = tls_builder.build()?;
Ok(ureq::AgentBuilder::new().tls_connector(tls_connector.into()).build())
// let tls_builder = native_tls::TlsConnector::builder();
// let tls_connector = tls_builder.build()?;
// Ok(ureq::AgentBuilder::new().tls_connector(tls_connector.into()).build())
Ok(ureq::AgentBuilder::new().build())
}

#[test]
Expand Down

0 comments on commit 0814891

Please sign in to comment.