Skip to content

Commit

Permalink
fix: Checks for native flag before using native certs in run function.
Browse files Browse the repository at this point in the history
  • Loading branch information
mchernicoff committed Jun 10, 2024
1 parent c2b4a31 commit efdb832
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions axoupdater/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,18 @@ impl AxoUpdater {
installer_file.set_permissions(perms)?;
}

let client = reqwest::Client::builder()
.tls_built_in_webpki_certs(false)
.tls_built_in_native_certs(true)
.build()?;
let client = if self.native_certs {
reqwest::Client::builder()
.tls_built_in_webpki_certs(false)
.tls_built_in_native_certs(true)
.build()?
} else {
reqwest::Client::builder()
.tls_built_in_webpki_certs(true)
.tls_built_in_native_certs(false)
.build()?
};

let download = client
.get(&installer_url.browser_download_url)
.header(reqwest::header::ACCEPT, "application/octet-stream")
Expand Down

0 comments on commit efdb832

Please sign in to comment.