You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This relies on bringing in the AKID if it exists, along with the issuer hash. This combo is used to try to match a CRL with the cert it is checking. This is also a new flow to the CheckCertCRLList that checks every cert list that shares an issuer to see if it is the best fit. AddCRL no longer rejects unverified CRLs on add and waits until the check to give a verifying CA as much time as possible to load. This is not breaking, just more permissive.
The X509_STORE_add_crl path now tries to verify and dedup on add as well and allows for multiple CRLs to be loaded and deduped if possible. While staying in line with OpenSSL behavior.
Testing
Regression test for the Zendesk report. (This is a large part of the diff becuase like the rest of the file, the Certs and CRLs are inlined)
Minor change to the living test where it no longer errors when it used to.
This relies on bringing in the akid along with the issuer hash.
This is also a new flow to the CheckCertCRLList that check every cert
list that shares an issuer to see it it applies. The AddCRL now does not
reject unverified CRLs on add and waits until the check to give as much
time as posible for a verifing CA to be loaded. This is not breaking
just more permissive.
The X509_STORE_add_crl path now tries to verify and dedups on add as well
and allows for muliple CRLs to be loaded and deduped if possible.
While staying inline with openSSL behavior.
This PR extends wolfSSL’s certificate revocation list (CRL) handling to support multiple signing keys under one issuer name, addressing CA key rollover.
Changes:
Uses authority key identifiers alongside issuer names to select CRLs and walk CA chains.
Retains unverified CRLs for later verification and shares deduplication logic with X509_STORE_add_crl.
Adds rollover regression coverage and updates existing tests for the new behavior and signatures.
File
Description
wolfssl/wolfcrypt/asn.h
Exposes signer key identifiers and issuer lookup for CRL checks.
wolfssl/crl.h
Adds an authority key identifier argument to CRL checking.
wolfcrypt/src/asn.c
Shares key-aware issuer lookup and preserves signer identifiers.
Scan targets checked:wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs Not reviewed (no scan target covers them):tests/api/test_certman.h Coverage: 5 of 8 in-scope changed file(s) opened by the reviewer; not opened: tests/unit-mcdc/test_crl_whitebox.c, tests/unit-mcdc/test_internal_revocation_whitebox.c, wolfssl/crl.h
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.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Critical CRL-selection flaws can allow certificate acceptance by ignoring freshness-comparison errors or letting a different-key fallback mask an expired exact-AKID CRL.
Obtain and validate the certification path for the issuer of the complete CRL. The trust anchor for the certificate path MUST be the same as the trust anchor used to validate the target certificate.
This is mainly a fallback for no AKID scenarios where a user might load multiple custom CAs with a name like CN=Admin or something
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
CRL handling can replace a valid entry with an expired one and fails to honor VERIFY_SKIP_DATE, causing incorrect certificate-check errors and changing which failures application callbacks can waive.
Expired CRLs replace valid fallback CRLs during deduplication
src/crl.c:1041
Adding a correctly signed but expired, higher-numbered CRL through X509_STORE_add_crl() now frees an existing unexpired CRL from the same key, because verification enables deduplication without checking nextUpdate. Subsequent certificate checks return CRL_CERT_DATE_ERR instead of using the valid fallback. Keep expired incoming entries from replacing existing entries, while still allowing the add operation to succeed.
Scan targets checked:wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs Not reviewed (no scan target covers them):tests/api/test_certman.h Coverage: 3 of 4 in-scope changed file(s) opened by the reviewer; not opened: src/wolfio.c
Findings: 1 1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
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/test_certman.h Coverage: 1 of 2 in-scope changed file(s) opened by the reviewer; not opened: src/wolfio.c
Findings: 1 1 finding(s) posted as inline comments (see file-level comments below)
This review was generated automatically by Fenrir. Reported findings require changes before merge.
The reason will be displayed to describe this comment to others. Learn more.
Stale CRL later in list overrides a valid not-revoked result with CRL_CERT_DATE_ERR · Logic errors
An expired matching CRL sets ret = CRL_CERT_DATE_ERR after an earlier current CRL already set *pFoundEntry = 1 and ret = 0, so the function returns a date error. CheckCertCRLCm skips the crlCb override because foundEntry != 0, so a valid certificate fails depending on list order.
Suggested fix: Record a stale CRL only when no current CRL has matched yet (e.g. if (!*pFoundEntry) ret = CRL_CERT_DATE_ERR;), and clear that error once a current CRL is found.
Related known findings(similar but distinct; listed for context, not part of this finding)
F-16319: F-16319 is about a stale CRL's revoked list never being consulted; this is a new PR regression where a stale CRL's date error replaces the success result from another, current CRL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Zendesk Ticket: https://wolfssl.zendesk.com/agent/tickets/22769
Description
This relies on bringing in the AKID if it exists, along with the issuer hash. This combo is used to try to match a CRL with the cert it is checking. This is also a new flow to the CheckCertCRLList that checks every cert list that shares an issuer to see if it is the best fit. AddCRL no longer rejects unverified CRLs on add and waits until the check to give a verifying CA as much time as possible to load. This is not breaking, just more permissive.
The X509_STORE_add_crl path now tries to verify and dedup on add as well and allows for multiple CRLs to be loaded and deduped if possible. While staying in line with OpenSSL behavior.
Testing
Regression test for the Zendesk report. (This is a large part of the diff becuase like the rest of the file, the Certs and CRLs are inlined)
Minor change to the living test where it no longer errors when it used to.
Checklist