New API for CRL unknown extension callback#10961
Conversation
|
|
jenkins retest this please. |
|
jenkins retest this please |
Adds public entry points mirroring the existing X.509 unknown extension callback so callers can register a handler for unrecognized CRL extensions instead of failing with ASN_CRIT_EXT_E.
Frauschi
left a comment
There was a problem hiding this comment.
🐺 Skoll Code Review
Overall recommendation: APPROVE
Findings: 3 total — 3 posted, 0 skipped
Posted findings
- [Medium] CRL unknown-ext callback is a silent no-op in non-template (WOLFSSL_NO_ASN_TEMPLATE) builds —
wolfcrypt/src/asn_orig.c:9194, wolfcrypt/src/asn_orig.c:9394-9541 - [Low] No test coverage for the non-Ex setter wolfSSL_CertManagerSetCRLUnknownExtCallback —
tests/api/test_certman.c:3020-3190 - [Low] Positive-return sanitization untested on the CRL-level extension path —
tests/api/test_certman.c:3160-3190, wolfcrypt/src/asn.c:37351-37357
Review generated by Skoll via Claude/Codex
| return EXPECT_RESULT(); | ||
| } | ||
|
|
||
| #if !defined(NO_CERTS) && defined(HAVE_CRL) && !defined(NO_RSA) && \ |
There was a problem hiding this comment.
🔵 [Low] No test coverage for the non-Ex setter wolfSSL_CertManagerSetCRLUnknownExtCallback
🔧 NIT test
All three new tests exercise only the ...Ex variant (wolfSSL_CertManagerSetCRLUnknownExtCallbackEx). The non-Ex public API wolfSSL_CertManagerSetCRLUnknownExtCallback (which sets crlUnknownExtCallback and drives the dcrl->unknownExtCallback(...) branch in both parse paths) is never called by any test, so that branch is uncovered.
Suggestion: Add a case that registers the non-Ex callback via wolfSSL_CertManagerSetCRLUnknownExtCallback and asserts it fires (the non-Ex callback signature omits the ctx argument).
Adds public entry points mirroring the existing X.509 unknown extension callback so callers can register a handler for unrecognized CRL extensions instead of failing with ASN_CRIT_EXT_E.
Fixes ZD 21887