refactor: replace OpenSSL transports and certificate imports

This commit is contained in:
Kevin Yue committed 2026-11-01 23:35:58 +08:00
1 parent 37c88c7adb
commit 14c4e24e0e
59 files changed
+1072 -1151

No files matched your search

+12 -2
View File
@@ -33,7 +33,12 @@ impl<'a> FileDownloader<'a> {
}
pub async fn download(&self) -> anyhow::Result<NamedTempFile> {
let res = reqwest::get(self.url).await?.error_for_status()?;
let res = gpapi::utils::request::client_builder()
.build()?
.get(self.url)
.send()
.await?
.error_for_status()?;
let content_length = res.content_length().unwrap_or(0);
info!("Content length: {}", content_length);
@@ -79,7 +84,12 @@ impl<'a> ChecksumFetcher<'a> {
}
pub async fn fetch(&self) -> anyhow::Result<String> {
let res = reqwest::get(self.url).await?.error_for_status()?;
let res = gpapi::utils::request::client_builder()
.build()?
.get(self.url)
.send()
.await?
.error_for_status()?;
let checksum = res.text().await?.trim().to_string();
Ok(checksum)