Skip to content
Merged
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: 2 additions & 2 deletions libdd-common/src/connector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ mod https {

/// Ensures the rustls default CryptoProvider is installed (ring for non-FIPS).
/// In FIPS mode, the caller must install the FIPS provider before any TLS use.
#[cfg(any(not(feature = "fips"), coverage))]
#[cfg(feature = "https")]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep FIPS branch from installing ring provider

This cfg(feature = "https") gate makes ensure_crypto_provider_initialized() install the non-FIPS ring provider whenever https is enabled, even if fips is also enabled through feature unification (for example --all-features or transitive defaults). Because rustls’ default provider is process-global and one-time, this can prevent later installation of the aws-lc FIPS provider and silently run non-FIPS crypto in builds that requested fips.

Useful? React with 👍 / 👎.

fn ensure_crypto_provider_initialized() {
use std::sync::Once;

Expand All @@ -103,7 +103,7 @@ mod https {

/// In FIPS mode, the caller must install the FIPS-compliant crypto provider
/// (e.g., aws-lc-rs FIPS) before any TLS connections are established.
#[cfg(all(feature = "fips", not(coverage)))]
#[cfg(not(feature = "https"))]
fn ensure_crypto_provider_initialized() {}

#[cfg(feature = "use_webpki_roots")]
Expand Down
Loading