Repository navigation
Crl Processing Changes: Allow for multiple CRLs per issuer and allow more paths to revoke certs - #12116
Crl Processing Changes: Allow for multiple CRLs per issuer and allow more paths to revoke certs #12116aidankeefe2022 wants to merge 4 commits into
Conversation
Major change for adding CRLs They are now only reported as duplicates if the issuer name and AKID do not match if AKDI is avaible. We then go into out normal checks for CLR number and date. This means that multiple CRLs from one issuer are added and we do not miss any revocations. When checking certs with issuer we match with name and AKID. If that does not work we then fall back to matching to any CRL with same issuer name. This can lead to rejecting when we should not but it is better than accpeting when we should not trade-off.
There was a problem hiding this comment.
🟡 Changes recommended
An AKID-less CRL update can discard another signing key’s revocations, allowing revoked certificates to pass, and the cycle test does not exercise the new CRL-walk guard.
2 open issues
What changed in this PR
This PR updates wolfSSL’s certificate revocation checks to distinguish CRLs by issuer name and authority key identifier (AKID), supporting issuers with multiple signing keys.
Changes:
- Keeps separate CRL series for different keys and adds same-name fallback handling.
- Passes AKIDs through certificate and chain checks, with bounded chain traversal.
- Adds fixtures and regression tests for key rollover, CRL-only keys, unverifiable CRLs, and cycles.
| File | Description |
|---|---|
wolfssl/wolfcrypt/asn.h |
Makes signer AKID fields available for CRL checks. |
wolfssl/crl.h |
Adds AKID to the internal CRL-check interface. |
wolfcrypt/src/asn.c |
Copies signer AKIDs in CRL-enabled builds. |
tests/unit-mcdc/test_internal_revocation_whitebox.c |
Updates CRL mocks for the new argument. |
tests/unit-mcdc/test_crl_whitebox.c |
Adds AKID matching and CRL-series test vectors. |
tests/api/test_certman.h |
Registers new CRL regression tests. |
tests/api/test_certman.c |
Tests rollover, fallback, verification failures, and chain traversal. |
tests/api/test_certman_crl_fixtures.h |
Adds certificate, key, and CRL fixtures. |
tests/api/include.am |
Includes the fixture header in source distributions. |
src/internal.c |
Follows issuer AKIDs and bounds CRL chain traversal. |
src/crl.c |
Updates CRL storage, matching, and fallback behavior. |
Review effort: Balanced
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12116
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): tests/api/include.am, tests/api/test_certman.h, tests/api/test_certman_crl_fixtures.h
Coverage: 8 of 8 in-scope changed file(s) opened by the reviewer
Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
Review tier: Max
…that AKIDN mismatch leads to same trust anchor
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12116
Scan targets checked: wolfssl-src, wolfssl-bugs
Unchanged since last review (not re-run): wolfcrypt-src, wolfcrypt-bugs
Not reviewed (no scan target covers them): tests/api/include.am, tests/api/test_certman.h, tests/api/test_certman_crl_fixtures.h
Coverage: 4 of 7 in-scope changed file(s) opened by the reviewer; not opened: src/ssl_certman.c, tests/api.c, tests/api/test_certman.c
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: Lite
Fenrir's latest completed scan found no issues; clearing the prior automated change request.
There was a problem hiding this comment.
🟡 Changes recommended
The comment in src/crl.c incorrectly implies that a fresh CRL-only-key CRL can cover an expired own-key CRL despite an AKID mismatch, and needs to describe the verified-CRL and shared-trust-anchor requirements.
1 open issue
2 resolved since last review
Review effort: Balanced
|
retest this please |
|
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #12116
Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): tests/api/include.am, tests/api/test_certman.h, tests/api/test_certman_crl_fixtures.h
Coverage: 5 of 6 in-scope changed file(s) opened by the reviewer; not opened: tests/api/test_certman.c
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: Lite
fc91154 to
0de70a7
Compare
There was a problem hiding this comment.
🟡 Changes recommended
CRL replacement can retain superseded revocations, while certificate-cache round-trips omit metadata needed to recognize same-anchor CRLs, causing erroneous CRL_MISSING failures.
2 open issues
1 resolved since last review
Review effort: Balanced



Description
Zendesk #: https://wolfssl.zendesk.com/agent/tickets/22769
wolfSSL found a cert's CRL by issuer name alone. When a CA rolls its key, or signs CRLs with a separate key, it publishes one CRL series per key under the same name. That broke CRL checking in three ways:
WOLFSSL_CRL_CHECKALLwalk moved to the first CA with the issuer's name, not the CA whose key actually signed the intermediate.Changes
Storing CRLs (
AddCRL,src/crl.c)Checking certs (
CheckCertCRLList/CheckCertCRL_ex,src/crl.c)CheckCertCRL_extakes a newakidargument: the cert's Authority Key Identifier.CRL_MISSING. This is due to key rollover protection: where the anchor has shifted, we want to be on the safe side and still honor CRLs that are valid.bbbbChain walk (
ProcessPeerCertsChainCRLCheck,src/internal.c)GetCAIssuer(). It finds the issuer by the CA's AKID and confirms the subject name matches, falling back to the name when there is no AKID. Each CA's AKID is passed to `CheckCWOLFSSL_MAX_CHAIN_DEPTHwithASN_PATHLEN_SIZE_ETrade-off
When no own-key CRL exists, falling back to other-key CRLs from the same issuer name can occasionally reject a cert that should pass. We chose this over the opposite risk of accepting a revoked cert. This is due to key rollover protection: where the anchor has shifted, we want to be on the safe side and still honor CRLs that are valid by rejecting based on issuer as a last resort.
Other Changes:
Testing
Added 8 tests to make sure CRLs are handled properly. These tests include a large set of certs and CRLs: tests/api/test_certman_crl_fixtures.h
I also updated the white box tests to match the new behavior.
Checklist