Skip to content
Closed
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
4 changes: 4 additions & 0 deletions bitcoind/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod download {

use anyhow::Context;
use bitcoin_hashes::{sha256, Hash};
use bitreq::rustls::crypto::{ring, CryptoProvider};
use flate2::read::GzDecoder;
use tar::Archive;

Expand Down Expand Up @@ -80,6 +81,9 @@ mod download {
}
let out_dir = PathBuf::from(std::env::var_os("OUT_DIR").unwrap());

// specify the default crypto provider for rustls
let _ = CryptoProvider::install_default(ring::default_provider());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this will likely set the default for rustls workspace-wide, i.e., potentially overriding any choice any other crate makes. I don't think we should call this manually.


let bitcoin_exe_home = download_dir(&out_dir);
std::fs::create_dir_all(&bitcoin_exe_home)
.with_context(|| format!("cannot create dir {:?}", bitcoin_exe_home))?;
Expand Down
2 changes: 2 additions & 0 deletions bitreq/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,6 @@ pub use proxy::*;
pub use request::*;
#[cfg(feature = "std")]
pub use response::{Response, ResponseLazy};
#[cfg(feature = "https-rustls")]
pub use rustls;
pub use url::{ParseError as UrlParseError, Url};
4 changes: 4 additions & 0 deletions electrsd/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod download {
use std::os::unix::fs::PermissionsExt;
use std::path::Path;
use std::str::FromStr;
use bitreq::rustls::crypto::{CryptoProvider, ring};

include!("src/versions.rs");

Expand All @@ -36,6 +37,9 @@ mod download {
return;
}

// specify the default crypto provider for rustls
let _ = CryptoProvider::install_default(ring::default_provider());

if !HAS_FEATURE {
return;
}
Expand Down
Loading