cloudflare/boring

FIPS support is broken for 32-bit non-windows platforms

jyn514 opened this issue · 0 comments

boring/boring-sys/build.rs

Lines 169 to 177 in 1507689

// Configure BoringSSL for building on 32-bit non-windows platforms.
if arch == "x86" && os != "windows" {
boringssl_cmake.define(
"CMAKE_TOOLCHAIN_FILE",
pwd.join(BORING_SSL_PATH)
.join("src/util/32-bit-toolchain.cmake")
.as_os_str(),
);
}

needs to instead be

                let toolchain_file = if cfg!(feature = "fips") {
                    format!("{}/util/32-bit-toolchain.cmake", BORING_SSL_DIR)
                } else {
                    format!("{}/src/util/32-bit-toolchain.cmake", BORING_SSL_DIR)
                };

                boringssl_cmake
                    .define("CMAKE_TOOLCHAIN_FILE", pwd.join(toolchain_file).as_os_str());