Skip to content

Commit a6bc3b3

Browse files
chore: do not initialize crypto in fips mode, it should be done already
1 parent f945944 commit a6bc3b3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ddcommon/src/connector/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ mod https {
9696
/// sometimes this is done as a side-effect of other operations, but we need to ensure it
9797
/// happens here. On non-unix platforms, ddcommon uses `ring` instead, which handles this
9898
/// at rustls initialization. TODO: Move to the more ergonomic LazyLock when MSRV is 1.80
99+
/// In fips mode we expect someone to have done this already.
99100
fn ensure_crypto_provider_initialized() {
100101
use std::sync::OnceLock;
101102
static INIT_CRYPTO_PROVIDER: OnceLock<()> = OnceLock::new();
102103
INIT_CRYPTO_PROVIDER.get_or_init(|| {
103-
#[cfg(unix)]
104+
#[cfg(all(unix, not(feature = "fips")))]
104105
#[allow(clippy::expect_used)]
105106
rustls::crypto::aws_lc_rs::default_provider()
106107
.install_default()

0 commit comments

Comments
 (0)