Repository navigation
PKCS7 additional sanity checks - #12086
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the PKCS#7 input-validation changes and regression coverage.
No open issues 🎉
What changed in this PR
Tightens wolfCrypt’s PKCS#7 input validation and adds regression coverage for malformed signed and enveloped data.
Changes:
- Returns
ASN_PARSE_Ewhen the initial SignedData sequence cannot be parsed. - Rejects empty KTRI encrypted keys before allocation and decryption.
- Adds tests for malformed inputs and repeated verification failures.
| File | Description |
|---|---|
wolfcrypt/src/pkcs7.c |
Adds explicit parse errors for invalid SignedData sequences and empty encrypted keys. |
tests/api/test_pkcs7.h |
Declares and registers the two new regression tests. |
tests/api/test_pkcs7.c |
Tests malformed KTRI input and rejection of non-sequence SignedData input. |
Review effort: Balanced
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12086
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-bugs
Not reviewed (no scan target covers them): tests/api/test_pkcs7.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
F-12379 and F-16275