Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/rust-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
'',
'--enable-all',
'--enable-all --enable-dilithium',
'--enable-all --enable-mlkem',
'--enable-cryptonly --disable-examples',
'--enable-cryptonly --disable-examples --disable-aes --disable-aesgcm',
'--enable-cryptonly --disable-examples --disable-aescbc',
Expand Down
3 changes: 3 additions & 0 deletions wrapper/rust/wolfssl-wolfcrypt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ fn scan_cfg() -> Result<()> {
check_cfg(&binding, "DILITHIUM_SEED_SZ", "dilithium_make_key_seed_sz");
check_cfg(&binding, "DILITHIUM_RND_SZ", "dilithium_rnd_sz");

/* mlkem / ML-KEM */
check_cfg(&binding, "wc_MlKemKey_Init", "mlkem");
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mlkem feature detection is keyed off wc_MlKemKey_Init, but the Rust wrapper uses wc_MlKemKey_New, wc_MlKemKey_Delete, wc_MlKemKey_MakeKey, etc. If wc_MlKemKey_Init isn’t present in a given wolfSSL build (or differs by version), cfg(mlkem) may not be set even though the functions actually used by the wrapper are available. Use a symbol that the wrapper directly relies on (e.g., wc_MlKemKey_New or wc_MlKemKey_MakeKey) for the check_cfg probe.

Suggested change
check_cfg(&binding, "wc_MlKemKey_Init", "mlkem");
check_cfg(&binding, "wc_MlKemKey_New", "mlkem");

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignoring this. If wc_MlKemKey_Init() is defined then _New(), etc... are defined as well.


/* sha */
check_cfg(&binding, "wc_InitSha", "sha");
check_cfg(&binding, "wc_InitSha224", "sha224");
Expand Down
1 change: 1 addition & 0 deletions wrapper/rust/wolfssl-wolfcrypt/headers.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
#include "wolfssl/wolfcrypt/aes.h"
#include "wolfssl/wolfcrypt/pwdbased.h"
#include "wolfssl/wolfcrypt/dilithium.h"
#include "wolfssl/wolfcrypt/mlkem.h"
1 change: 1 addition & 0 deletions wrapper/rust/wolfssl-wolfcrypt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub mod fips;
pub mod hkdf;
pub mod hmac;
pub mod kdf;
pub mod mlkem;
pub mod prf;
pub mod random;
pub mod rsa;
Expand Down
Loading