13 lines
542 B
Rust
13 lines
542 B
Rust
//! Refuses `fips-validated` unless the build links a prebuilt validated
|
|
//! BoringCrypto (`BORING_BSSL_FIPS_PATH`), so the provider never reports FIPS
|
|
//! mode for a module built from source.
|
|
|
|
fn main() {
|
|
println!("cargo:rerun-if-env-changed=BORING_BSSL_FIPS_PATH");
|
|
if std::env::var_os("CARGO_FEATURE_FIPS_VALIDATED").is_some()
|
|
&& std::env::var_os("BORING_BSSL_FIPS_PATH").is_none_or(|p| p.is_empty())
|
|
{
|
|
panic!("feature fips-validated needs BORING_BSSL_FIPS_PATH set to a validated BoringCrypto build");
|
|
}
|
|
}
|