Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 67 additions & 29 deletions Cargo.lock

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

4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ dirs = "6.0.0"
env_logger = "0.11.8"
flate2 = "1.1.5"
log = "0.4.28"
reqwest = { version = "0.12.24", default-features = false, features = ["http2", "charset", "system-proxy", "blocking", "rustls-tls-native-roots"] }
rustls = { version = "0.23.35", default-features = false, features = ["std", "tls12", "ring", "logging"] }
rustls-platform-verifier = "0.6.2"
reqwest = { version = "0.13.1", default-features = false, features = ["http2", "charset", "system-proxy", "blocking", "rustls"] }
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.145"
serde_yaml_ng = "0.10.0"
Expand Down
13 changes: 1 addition & 12 deletions src/micromamba/download.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use crate::csmrc::Config;

use log::{debug, info};
use rustls::ClientConfig;
use rustls_platform_verifier::ConfigVerifierExt;
use std::env;
use std::error::Error;
use std::fmt;
Expand All @@ -18,7 +16,6 @@ pub enum DownloadError {
DownloadDisabled,
IO(io::Error),
Reqwest(reqwest::Error),
Rustls(rustls::Error),
}

impl From<io::Error> for DownloadError {
Expand All @@ -33,12 +30,6 @@ impl From<reqwest::Error> for DownloadError {
}
}

impl From<rustls::Error> for DownloadError {
fn from(err: rustls::Error) -> Self {
Self::Rustls(err)
}
}

impl fmt::Display for DownloadError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Expand Down Expand Up @@ -66,7 +57,6 @@ impl fmt::Display for DownloadError {
}
Ok(())
}
DownloadError::Rustls(e) => write!(f, "TLS (rustls) error: {}", e),
}
}
}
Expand Down Expand Up @@ -211,10 +201,9 @@ pub fn download_micromamba(config: &Config) -> Result<PathBuf, DownloadError> {
return Err(DownloadError::DownloadDisabled);
}

let tls_config = ClientConfig::with_platform_verifier()?;
let client = reqwest::blocking::Client::builder()
.tls_backend_rustls()
.timeout(Duration::from_secs(60))
.use_preconfigured_tls(tls_config)
.build()?;
let response_tarbz2 = client.get(url).send()?;
debug!("Download completed, sending it to BzDecoder");
Expand Down