diff --git a/boring-rustls-provider/src/kx/mod.rs b/boring-rustls-provider/src/kx/mod.rs index 44b524c..c8c0e2b 100644 --- a/boring-rustls-provider/src/kx/mod.rs +++ b/boring-rustls-provider/src/kx/mod.rs @@ -6,7 +6,7 @@ mod ex; #[cfg(feature = "mlkem")] mod pq; #[cfg(feature = "mlkem")] -pub(crate) use pq::X25519MlKem768; +pub use pq::X25519MlKem768; /// Key type discriminant used by [`ex::KeyExchange`] to select the /// appropriate peer key parsing and DH derivation logic. diff --git a/boring-rustls-provider/src/lib.rs b/boring-rustls-provider/src/lib.rs index e02da06..89071cf 100644 --- a/boring-rustls-provider/src/lib.rs +++ b/boring-rustls-provider/src/lib.rs @@ -14,7 +14,7 @@ mod hash; mod helper; mod hkdf; mod hmac; -mod kx; +pub mod kx; #[cfg(feature = "tls12")] mod prf; pub mod sign; @@ -96,7 +96,7 @@ impl rustls::crypto::KeyProvider for Provider { } #[cfg(feature = "fips")] -static ALL_FIPS_CIPHER_SUITES: &[SupportedCipherSuite] = &[ +pub static ALL_FIPS_CIPHER_SUITES: &[SupportedCipherSuite] = &[ SupportedCipherSuite::Tls13(&tls13::AES_256_GCM_SHA384), SupportedCipherSuite::Tls13(&tls13::AES_128_GCM_SHA256), #[cfg(feature = "tls12")] @@ -110,7 +110,7 @@ static ALL_FIPS_CIPHER_SUITES: &[SupportedCipherSuite] = &[ ]; #[cfg(not(feature = "fips"))] -static ALL_CIPHER_SUITES: &[SupportedCipherSuite] = &[ +pub static ALL_CIPHER_SUITES: &[SupportedCipherSuite] = &[ SupportedCipherSuite::Tls13(&tls13::CHACHA20_POLY1305_SHA256), SupportedCipherSuite::Tls13(&tls13::AES_256_GCM_SHA384), SupportedCipherSuite::Tls13(&tls13::AES_128_GCM_SHA256), @@ -134,7 +134,7 @@ static ALL_CIPHER_SUITES: &[SupportedCipherSuite] = &[ /// The `fips` feature implies `mlkem`, so X25519MLKEM768 is always /// available and preferred in FIPS mode. #[cfg(feature = "fips")] -static ALL_FIPS_KX_GROUPS: &[&dyn SupportedKxGroup] = &[ +pub static ALL_FIPS_KX_GROUPS: &[&dyn SupportedKxGroup] = &[ &kx::X25519MlKem768 as _, // PQ hybrid preferred &kx::Secp256r1 as _, // P-256 &kx::Secp384r1 as _, // P-384 @@ -145,7 +145,7 @@ static ALL_FIPS_KX_GROUPS: &[&dyn SupportedKxGroup] = &[ /// Matches boring's default supported group list exactly: /// X25519MLKEM768 (when mlkem enabled), X25519, P-256, P-384. #[cfg(all(not(feature = "fips"), feature = "mlkem"))] -static ALL_KX_GROUPS: &[&dyn SupportedKxGroup] = &[ +pub static ALL_KX_GROUPS: &[&dyn SupportedKxGroup] = &[ &kx::X25519MlKem768 as _, // PQ hybrid preferred &kx::X25519 as _, &kx::Secp256r1 as _, @@ -154,5 +154,5 @@ static ALL_KX_GROUPS: &[&dyn SupportedKxGroup] = &[ /// See [`ALL_KX_GROUPS`] (mlkem variant). #[cfg(not(any(feature = "fips", feature = "mlkem")))] -static ALL_KX_GROUPS: &[&dyn SupportedKxGroup] = +pub static ALL_KX_GROUPS: &[&dyn SupportedKxGroup] = &[&kx::X25519 as _, &kx::Secp256r1 as _, &kx::Secp384r1 as _];