Skip to content

Commit a40cba6

Browse files
committed
Make ML-KEM optional
1 parent 9cc97c8 commit a40cba6

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

boring-sys/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ include = [
4343
]
4444

4545
[package.metadata.docs.rs]
46-
features = ["rpk", "underscore-wildcards"]
46+
features = ["rpk", "underscore-wildcards", "mlkem"]
4747
rustdoc-args = ["--cfg", "docsrs"]
4848

4949
[features]
@@ -58,6 +58,9 @@ fips = []
5858
# Enables Raw public key API (https://datatracker.ietf.org/doc/html/rfc7250)
5959
rpk = []
6060

61+
# Require mlkem.h
62+
mlkem = []
63+
6164
# Applies a patch (`patches/underscore-wildcards.patch`) to enable
6265
# `ffi::X509_CHECK_FLAG_UNDERSCORE_WILDCARDS`. This feature is necessary in
6366
# order to compile the bindings for the default branch of boringSSL

boring-sys/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ pub use generated::{ssl_compliance_policy_t, ERR_add_error_data, SSL_set1_groups
3030
pub use generated::{BIO_new, OPENSSL_free, SSL_ERROR_NONE}; // if these are missing, your include path is incorrect
3131
#[cfg(feature = "fips")]
3232
pub use generated::{FIPS_mode, SSL_CTX_set_compliance_policy}; // your include path is incorrect or has a version of boringssl without FIPS support
33+
#[cfg(feature = "mlkem")]
34+
pub use generated::{MLKEM768_encap, MLKEM768_private_key_from_seed}; // your include path is incorrect or has a version of boringssl without mlkem support
3335
#[cfg(feature = "rpk")]
3436
pub use generated::{SSL_CREDENTIAL_new_raw_public_key, SSL_CREDENTIAL_set1_spki}; // your include path is incorrect or has a version of boringssl without rpk support
3537

0 commit comments

Comments
 (0)