Skip to content

Commit

Permalink
Disable revocation checks in downloader on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Jan 17, 2024
1 parent e715678 commit 8e33d67
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rye/src/bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::{env, fs};

use anyhow::{bail, Context, Error};
use console::style;
use curl::easy::SslOpt;
use indicatif::{ProgressBar, ProgressStyle};
use once_cell::sync::Lazy;
use tempfile::NamedTempFile;
Expand Down Expand Up @@ -410,6 +411,14 @@ pub fn download_url_ignore_404(url: &str, output: CommandOutput) -> Result<Optio
handle.proxy(&proxy)?;
}

// on windows we want to disable revocation checks. The reason is that MITM proxies
// will otherwise not work. This is a schannel specific behavior anyways.
// for more information see https://github.com/curl/curl/issues/264
#[cfg(windows)]
{
handle.ssl_options(SslOpt::new().no_revoke(true))?;
}

let write_archive = &mut archive_buffer;
{
let mut transfer = handle.transfer();
Expand Down

0 comments on commit 8e33d67

Please sign in to comment.