Repository navigation
Declare wc_ForceZero once across memory.h and wc_compat.h - #12069
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change preventing duplicate zeroizer declarations.
No open issues 🎉
What changed in this PR
This PR prevents duplicate zeroizer declarations across memory.h and wc_compat.h, addressing FIPS v2 compilation failures for consumers using -Wredundant-decls -Werror, including wolfEngine.
Changes:
- Adds a shared
WC_FORCE_ZERO_DECLAREDguard so either header can declare the zeroizer first without redeclaration. - Preserves the existing prototypes and
WOLFSSL_NO_FORCE_ZEROalias without changing the API or ABI.
| File | Description |
|---|---|
wolfssl/wolfcrypt/wc_compat.h |
Guards the zeroizer declaration needed by the FIPS compatibility shims. |
wolfssl/wolfcrypt/memory.h |
Uses the same guard to avoid redeclaring the zeroizer. |
Review effort: Balanced
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12069
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
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
|
jenkins retest this please |
847da6f2e9added a secondwc_ForceZero()(orForceZero()withWOLFSSL_NO_FORCE_ZERO) prototype inwc_compat.hfor the FIPS AES-GCM compat shims.
memory.handwc_compat.his parsed second redeclares it, so any application built with-Wredundant-decls -Werroragainst a FIPS v2 build fails to compile, in either include order.test/test_aestag.c, so Fix fenrir issues across wolfEngine wolfEngine#257 cannotgo green until this lands.
WC_FORCE_ZERO_DECLAREDis not yet defined, and define it afterdeclaring, so exactly one prototype is emitted.
wc_ForceZerotoForceZeroalias are unchanged.wc_ForceZero()intowc_port.c. This is the minimal fix to unblockdownstream now; it can be dropped when fix forcezero linking on every build #10935 merges.