Fix CRL selection by cRLNumber and scope#491
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #491 +/- ##
==========================================
- Coverage 97.68% 97.67% -0.02%
==========================================
Files 20 20
Lines 3971 3995 +24
==========================================
+ Hits 3879 3902 +23
- Misses 92 93 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
Contributor
Author
|
Any chance this could get merged? |
Member
|
No need to ping again so soon. |
Contributor
Author
|
Sorry, didn't know if anyone is looking at this. |
ctz
reviewed
Jun 1, 2026
Member
ctz
left a comment
There was a problem hiding this comment.
Otherwise, this is looking alright to me.
0f56a1f to
d970949
Compare
Contributor
Author
|
I rebased this change on top of main, should be ready for review/merge. |
djc
approved these changes
Jun 3, 2026
Choose the newest authoritative CRL within the same issuer/IDP scope before checking revocation status.
djc
approved these changes
Jun 3, 2026
ctz
approved these changes
Jun 3, 2026
Contributor
Author
|
Thanks for merging this! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Fixes the issue in #488.
Previously, we used the first CRL with applicable scope on the passed list, without checking that it's the newest one we have.
In the new logic, once we find a CRL with applicable scope, we find the newest available CRL in the same scope, and use that for revocation check. We decide which is newest by CRL number, as RFC 5280 explicitly requires these to be present, and offers them for exactly this purpose:
There are some design considerations for handling scenarios when multiple scopes are applicable, and when some CRLs are invalid. These apply to pre-existing code too, so I'm not resolving these in this fix, and instead I'll open a separate issue to discuss them.
I used Codex GPT-5.5 on xhigh while working on this change, but I must say that it while it was very helpful with writing tests, it didn't do a good job on implementing the actual logic: its implementation was overly complicated, with extra unnecessary variables and unnecessarily nested match cases. I basically entirely rewrote it.