Skip to content

Commit e80a19b

Browse files
chore: make the fips feature unix-only
1 parent ba701fe commit e80a19b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ddcommon/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ use_webpki_roots = ["hyper-rustls/webpki-roots"]
7676
# Enable this feature to enable stubbing of cgroup
7777
# php directly import this crate and uses functions gated by this feature for their test
7878
cgroup_testing = []
79-
# FIPS mode uses the FIPS-compliant cryptographic provider
79+
# FIPS mode uses the FIPS-compliant cryptographic provider (Unix only)
8080
fips = ["https", "hyper-rustls/fips"]

ddcommon/src/connector/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ mod https {
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
9999
/// In fips mode we expect someone to have done this already.
100-
#[cfg(not(feature = "fips"))]
100+
#[cfg(not(all(unix, feature = "fips")))]
101101
fn ensure_crypto_provider_initialized() {
102102
use std::sync::OnceLock;
103103
static INIT_CRYPTO_PROVIDER: OnceLock<()> = OnceLock::new();
@@ -111,7 +111,8 @@ mod https {
111111
}
112112

113113
// This this actually needs to be done by the user somewhere in their own main.
114-
#[cfg(feature = "fips")]
114+
// This will only be active on Unix platforms
115+
#[cfg(all(unix, feature = "fips"))]
115116
fn ensure_crypto_provider_initialized() {}
116117

117118
#[cfg(feature = "use_webpki_roots")]

trace-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ test-utils = [
7676
]
7777
proxy = ["hyper-http-proxy"]
7878
compression = ["zstd", "flate2"]
79-
# FIPS mode uses the FIPS-compliant cryptographic provider
79+
# FIPS mode uses the FIPS-compliant cryptographic provider (Unix only)
8080
fips = ["ddcommon/fips"]

0 commit comments

Comments
 (0)