Skip to content

New API for CRL unknown extension callback#10961

Open
anhu wants to merge 3 commits into
wolfSSL:masterfrom
anhu:crl_unknown_ext
Open

New API for CRL unknown extension callback#10961
anhu wants to merge 3 commits into
wolfSSL:masterfrom
anhu:crl_unknown_ext

Conversation

@anhu

@anhu anhu commented Jul 21, 2026

Copy link
Copy Markdown
Member

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

@anhu
anhu requested a review from wolfSSL-Bot July 21, 2026 20:00
@anhu anhu self-assigned this Jul 21, 2026
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

gcc-arm-cortex-m3

  • FLASH: .text +64 B (+0.1%, 122,603 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m4

  • FLASH: .text +64 B (+0.0%, 200,853 B / 262,144 B, total: 77% used)

gcc-arm-cortex-m4-dtls13

  • FLASH: .text +64 B (+0.0%, 181,092 B / 1,048,576 B, total: 17% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +832 B (+0.1%, 770,044 B / 1,048,576 B, total: 73% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +256 B (+0.1%, 326,168 B / 1,048,576 B, total: 31% used)

gcc-arm-cortex-m4-tls12

  • FLASH: .text +64 B (+0.1%, 123,355 B / 262,144 B, total: 47% used)

gcc-arm-cortex-m7

  • FLASH: .text +64 B (+0.0%, 200,853 B / 262,144 B, total: 77% used)

linuxkm-standard

@anhu
anhu force-pushed the crl_unknown_ext branch from 6d8c77f to fc356c9 Compare July 22, 2026 14:43
@anhu

anhu commented Jul 22, 2026

Copy link
Copy Markdown
Member Author

jenkins retest this please.

@anhu

anhu commented Jul 23, 2026

Copy link
Copy Markdown
Member Author

jenkins retest this please

anhu added 2 commits July 23, 2026 15:30
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.
@anhu
anhu force-pushed the crl_unknown_ext branch from fc356c9 to 7ea5bb6 Compare July 23, 2026 19:30
@anhu anhu assigned wolfSSL-Bot and unassigned anhu Jul 23, 2026

@Frauschi Frauschi 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.

🐺 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) buildswolfcrypt/src/asn_orig.c:9194, wolfcrypt/src/asn_orig.c:9394-9541
  • [Low] No test coverage for the non-Ex setter wolfSSL_CertManagerSetCRLUnknownExtCallbacktests/api/test_certman.c:3020-3190
  • [Low] Positive-return sanitization untested on the CRL-level extension pathtests/api/test_certman.c:3160-3190, wolfcrypt/src/asn.c:37351-37357

Review generated by Skoll via Claude/Codex

Comment thread tests/api/test_certman.c
return EXPECT_RESULT();
}

#if !defined(NO_CERTS) && defined(HAVE_CRL) && !defined(NO_RSA) && \

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.

🔵 [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).

@Frauschi Frauschi assigned anhu and unassigned wolfSSL-Bot Jul 24, 2026
@anhu anhu assigned wolfSSL-Bot and unassigned anhu Jul 24, 2026
@anhu
anhu requested a review from Frauschi July 24, 2026 19:10
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.

3 participants