Repository navigation
Fenrir fixes : ecc.c - #12046
Fenrir fixes : ecc.c#12046aidankeefe2022 wants to merge 1 commit into
Conversation
Fenrir 9930: harden protocol rules Updated docs to reflect what was assumed by all tests
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the ECC context flag-validation change.
No open issues 🎉
What changed in this PR
Hardens ECC encryption context creation for Fenrir 9930 by accepting only the supported client and server protocol flags.
Changes:
- Rejects invalid flags before allocating a context or narrowing the flag value.
- Adds tests for invalid, combined, and byte-truncating flag values.
- Documents the accepted flags and updates usage examples.
| File | Description |
|---|---|
wolfcrypt/src/ecc.c |
Validates flags in wc_ecc_ctx_new_ex before allocation. |
tests/api/test_ecc.c |
Adds invalid-flag regression tests. |
doc/dox_comments/header_files/ecc.h |
Clarifies flag requirements and corrects examples. |
Review effort: Balanced
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12046
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-bugs
Not reviewed (no scan target covers them): doc/dox_comments/header_files/ecc.h
Coverage: 2 of 2 in-scope changed file(s) opened by the reviewer
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
Review tier: Max
Description
Fenrir 9930: harden protocol rules.
Updated docs to reflect what was assumed by all tests.
Tests
Added a test to check that only proper Flag values are sent to the wc_ecc_ctx_new_ex function