Add wc_ecc_key_new_ex - #11160
Conversation
Rust wrapper: use wc_ecc_key_new_ex for ECC when available. Fixes F-8300.
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Add the new wc_ecc_key_new_ex() C API and update the Rust wrapper (and HPKE internals) to use it when available, enabling explicit devId selection and avoiding post-allocation patching.
Changes:
- Introduce
wc_ecc_key_new_ex(void* heap, int devId)and refactorwc_ecc_key_new()to delegate to it. - Update Rust wrapper to call
wc_ecc_key_new_ex()when detected via build-time scanning. - Switch HPKE private-key copy path to allocate ECC keys with explicit
devId.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| wrapper/rust/wolfssl-wolfcrypt/src/ecc.rs | Use wc_ecc_key_new_ex when available; restrict devId patching to fallback builds. |
| wrapper/rust/wolfssl-wolfcrypt/build.rs | Detect wc_ecc_key_new_ex and enable cfg(ecc_key_new_ex) for Rust. |
| wolfssl/wolfcrypt/ecc.h | Expose new public API wc_ecc_key_new_ex. |
| wolfcrypt/src/ecc.c | Implement wc_ecc_key_new_ex and refactor wc_ecc_key_new to call it. |
| wolfcrypt/src/hpke.c | Allocate ECC key copies using wc_ecc_key_new_ex with an explicit devId. |
| doc/dox_comments/header_files/ecc.h | Document wc_ecc_key_new_ex and correct wc_ecc_key_new return semantics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
retest this please (Calling Pipeline was cancelled, build removed) |
|
retest this please (git ssh permission problem) |
Description
Add wc_ecc_key_new_ex
Rust wrapper: use wc_ecc_key_new_ex for ECC when available.
Fixes F-8300.
Testing
How did you test?
Checklist