Skip to content

Fenrir fixes : ecc.c - #12046

Open
aidankeefe2022 wants to merge 1 commit into
wolfSSL:masterfrom
aidankeefe2022:ecc-fix
Open

aidankeefe2022 wants to merge 1 commit into
wolfSSL:masterfrom
aidankeefe2022:ecc-fix

Conversation

@aidankeefe2022

Copy link
Copy Markdown
Member

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

Fenrir 9930: harden protocol rules

Updated docs to reflect what was assumed by all tests

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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

@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants