Cargo Features

boring-sys has no features set by default.

[dependencies]
boring-sys = { version = "4.16.0", features = ["fips", "fips-precompiled", "fips-link-precompiled", "rpk", "pq-experimental", "underscore-wildcards"] }
fips

Compile boringssl using the FIPS build flag if building boringssl from scratch.

See https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md for instructions and more details on the boringssl FIPS flag.

fips-precompiled

Use a precompiled FIPS-validated version of BoringSSL. Meant to be used with FIPS-20230428 or newer. Users must set BORING_BSSL_FIPS_PATH to use this feature, or else the build will fail.

Link with precompiled FIPS-validated bcm.o module.

rpk

Enables Raw public key API (https://datatracker.ietf.org/doc/html/rfc7250)

pq-experimental

Applies a patch (patches/boring-pq.patch) to the boringSSL source code that enables support for PQ key exchange. This feature is necessary in order to compile the bindings for the default branch of boringSSL (deps/boringssl). Alternatively, a version of boringSSL that implements the same feature set can be provided by setting BORING_BSSL{,_FIPS}_SOURCE_PATH.

underscore-wildcards

Applies a patch (patches/underscore-wildcards.patch) to enable ffi::X509_CHECK_FLAG_UNDERSCORE_WILDCARDS. Same caveats as those for pq-experimental feature apply.