Merged
Conversation
0c31782 to
587dd26
Compare
587dd26 to
ebda79f
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the OCSP-to-CRL fallback mechanism when OCSP returns a CERT_UNKNOWN status. The fallback was previously unreachable due to incorrect return code checking in internal.c. The fix allows both leaf and non-leaf certificates to fall back to CRL verification when OCSP status is unknown.
Changes:
- Fixed return code checks in
internal.cto enable CRL fallback when OCSP returnsCERT_UNKNOWN - Added two TLS-level integration tests verifying the fallback works for both leaf and intermediate certificates
- Enhanced the Python OCSP test blob generator to support
CERT_UNKNOWNresponses
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/internal.c | Modified return code checks to allow CRL fallback when OCSP returns CERT_UNKNOWN |
| tests/api/test_ocsp.c | Added two new test functions for leaf and non-leaf CRL fallback scenarios |
| tests/api/test_ocsp.h | Added declarations for the two new test functions |
| tests/api.c | Registered the two new tests in the test suite |
| tests/api/create_ocsp_test_blobs.py | Added CERT_UNKNOWN status support and two new test response configurations |
| tests/api/test_ocsp_test_blobs.h | Updated OCSP response blobs with new timestamps and two new CERT_UNKNOWN responses |
| certs/ocsp/server1-chain-noroot.pem | Added new certificate chain file for testing (server1 + intermediate1 without root) |
| certs/ocsp/root-ca-crl.pem | Added empty CRL from root CA for testing |
| certs/ocsp/renewcerts.sh | Added script commands to generate server1-chain-noroot.pem |
| certs/ocsp/include.am | Added new certificate and CRL files to distribution |
| certs/crl/gencrls.sh | Added steps to generate the root-ca CRL |
| .gitignore | Added Python cache directory to gitignore |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
douzzer
approved these changes
Mar 5, 2026
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.
Description
The CRL fallback code was found to be unreachable in
internal.cdue to return code checking.CERT_UNKNOWNstatus for both leaf and non-leaf (intermediate) certificate paths inProcessPeerCerts().CERT_UNKNOWN, covering the leaf path and the non-leaf (OCSP_CHECKALL+CRL_CHECKALL) pathCERT_UNKNOWNsupport to the Python OCSP test blob generator and new test cert/CRL artifactsTesting
Added new tests to exercise the CRL fallback for both intermediate and leaf certs, and generation scripts.
Checklist