Skip to content

Add OCSP Responder extension criticality validator (BR 7.1.2.8.2) - #210

Open
ChyaHungTsai wants to merge 1 commit into
digicert:mainfrom
ChyaHungTsai:ocsp-responder-extension-criticality
Open

ChyaHungTsai wants to merge 1 commit into
digicert:mainfrom
ChyaHungTsai:ocsp-responder-extension-criticality

Conversation

@ChyaHungTsai

Copy link
Copy Markdown

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 of CaCertificateExtensionCriticalityValidator and SubscriberExtensionCriticalityValidator.

Criticality mapping (extensions whose Critical column is "-" are not included):

  • MUST be critical: keyUsage, basicConstraints
  • MUST NOT be critical: authorityKeyIdentifier, id-pkix-ocsp-nocheck, subjectKeyIdentifier, authorityInformationAccess, certificatePolicies, crlDistributionPoints, Signed Certificate Timestamp List

Changes

  • pkilint/cabf/serverauth/serverauth_ocsp.py: add OcspExtensionCriticalityValidator
  • pkilint/cabf/serverauth/__init__.py: add the validator to create_ocsp_extension_validator_container
  • pkilint/cabf/serverauth/finding_metadata.csv: add the new finding codes
  • Tests:
    • New ocsp_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 exercised
    • ocsp_responder/aia_ocsp_present.crttest: now also reports non_critical_basic_constraints_extension
    • ocsp_responder/aia_ca_issuers_present.crttest: now also reports non_critical_key_usage_extension (this test certificate's keyUsage is not critical; it was previously reported only as the PKIX WARNING pkix.key_usage_extension_not_critical)

black --check passes. All OCSP_RESPONDER integration 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.

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.
Copilot AI lite review requested due to automatic review settings October 12, 2026 02:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: extension criticality checks for OCSP Responder certificates (BR 7.1.2.8.2)

2 participants