Repository navigation
Add OCSP Responder extension criticality validator (BR 7.1.2.8.2) - #210
Open
ChyaHungTsai wants to merge 1 commit into
Open
ChyaHungTsai wants to merge 1 commit into
ChyaHungTsai wants to merge 1 commit into
Conversation
Add OcspExtensionCriticalityValidator, which validates the criticality of extensions in OCSP Responder certificates against the "Critical" column of TLS BR Section 7.1.2.8.2, following the pattern of the existing CA and subscriber extension criticality validators.
There was a problem hiding this comment.
🟢 Approval recommended
No unresolved blocking issues were identified.
0 open findings
What changed in this PR
Adds OCSP Responder certificate extension-criticality validation for TLS BR 7.1.2.8.2.
Changes:
- Adds and registers the criticality validator.
- Adds finding metadata.
- Updates and expands OCSP integration tests.
| File | Description |
|---|---|
tests/integration_certificate/tls_br/ocsp_responder/extension_criticality_incorrect.crttest |
Tests incorrect criticalities. |
tests/integration_certificate/tls_br/ocsp_responder/aia_ocsp_present.crttest |
Updates expected findings. |
tests/integration_certificate/tls_br/ocsp_responder/aia_ca_issuers_present.crttest |
Updates expected findings. |
pkilint/cabf/serverauth/serverauth_ocsp.py |
Implements criticality validation. |
pkilint/cabf/serverauth/finding_metadata.csv |
Defines new findings. |
pkilint/cabf/serverauth/__init__.py |
Registers the validator. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch has not been deployed
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.
Resolves #209
This PR adds
OcspExtensionCriticalityValidator, which validates the criticality of extensions in OCSP Responder certificates against the "Critical" column of TLS BR Section 7.1.2.8.2. It follows the existing pattern ofCaCertificateExtensionCriticalityValidatorandSubscriberExtensionCriticalityValidator.Criticality mapping (extensions whose Critical column is "-" are not included):
keyUsage,basicConstraintsauthorityKeyIdentifier,id-pkix-ocsp-nocheck,subjectKeyIdentifier,authorityInformationAccess,certificatePolicies,crlDistributionPoints, Signed Certificate Timestamp ListChanges
pkilint/cabf/serverauth/serverauth_ocsp.py: addOcspExtensionCriticalityValidatorpkilint/cabf/serverauth/__init__.py: add the validator tocreate_ocsp_extension_validator_containerpkilint/cabf/serverauth/finding_metadata.csv: add the new finding codesocsp_responder/extension_criticality_incorrect.crttest: a test certificate (created specifically for this test) containing all nine extensions with a Y/N value in the Critical column, each with the opposite criticality, so every finding code is exercisedocsp_responder/aia_ocsp_present.crttest: now also reportsnon_critical_basic_constraints_extensionocsp_responder/aia_ca_issuers_present.crttest: now also reportsnon_critical_key_usage_extension(this test certificate'skeyUsageis not critical; it was previously reported only as the PKIX WARNINGpkix.key_usage_extension_not_critical)black --checkpasses. AllOCSP_RESPONDERintegration tests pass, and the full test suite shows no new failures.Please feel free to adjust anything (naming, severity, test layout) to fit the project's conventions. Thank you for considering this.