diff --git a/boring/src/ssl/mod.rs b/boring/src/ssl/mod.rs index c4979f97..02cc142d 100644 --- a/boring/src/ssl/mod.rs +++ b/boring/src/ssl/mod.rs @@ -718,15 +718,15 @@ impl SslCurve { pub const X25519_KYBER768_DRAFT00: SslCurve = SslCurve(ffi::SSL_CURVE_X25519_KYBER768_DRAFT00 as _); - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] pub const X25519_KYBER768_DRAFT00_OLD: SslCurve = SslCurve(ffi::SSL_CURVE_X25519_KYBER768_DRAFT00_OLD as _); - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] pub const X25519_KYBER512_DRAFT00: SslCurve = SslCurve(ffi::SSL_CURVE_X25519_KYBER512_DRAFT00 as _); - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] pub const P256_KYBER768_DRAFT00: SslCurve = SslCurve(ffi::SSL_CURVE_P256_KYBER768_DRAFT00 as _); /// Returns the curve name @@ -761,13 +761,13 @@ impl SslCurve { ffi::SSL_CURVE_X25519 => Some(ffi::NID_X25519), #[cfg(not(feature = "fips"))] ffi::SSL_CURVE_X25519_KYBER768_DRAFT00 => Some(ffi::NID_X25519Kyber768Draft00), - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] ffi::SSL_CURVE_X25519_KYBER768_DRAFT00_OLD => Some(ffi::NID_X25519Kyber768Draft00Old), - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] ffi::SSL_CURVE_X25519_KYBER512_DRAFT00 => Some(ffi::NID_X25519Kyber512Draft00), - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] ffi::SSL_CURVE_P256_KYBER768_DRAFT00 => Some(ffi::NID_P256Kyber768Draft00), - #[cfg(feature = "pq-experimental")] + #[cfg(all(not(feature = "fips"), feature = "pq-experimental"))] ffi::SSL_CURVE_X25519_MLKEM768 => Some(ffi::NID_X25519MLKEM768), _ => None, }