Repository navigation
feat(acceleration): implement CRL/OCSP certificate revocation checking (v1.8.0 #38) - #4283
Merged
makr-code merged 3 commits intoMar 16, 2026
Merged
Conversation
…g (v1.8.0 #38) Co-authored-by: makr-code <[email protected]>
Copilot stopped work on behalf of
makr-code due to an error
March 16, 2026 10:01
Copilot stopped work on behalf of
makr-code due to an error
March 16, 2026 11:28
…erify_cert return check Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] [PLUGIN-SEC-12] Implement CRL and OCSP certificate revocation checking
feat(acceleration): implement CRL/OCSP certificate revocation checking (v1.8.0 #38)
Mar 16, 2026
makr-code
marked this pull request as ready for review
March 16, 2026 13:28
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.
Completes Issue #38 (Plugin Security: CRL/OCSP Certificate Revocation Checking). The prior commit implemented the core feature; this audit pass identified and closes the remaining gap: signature-invalid test coverage was absent despite being an explicit AC, and
X509_verify_cert()return values were silently ignored in both revocation paths.Changes
src/acceleration/plugin_security.cppX509_verify_cert()return value; emitTHEMIS_WARNon chain verification failure rather than silently proceeding with a potentially invalid issuer keytests/test_plugin_security_crl_ocsp.cppTwo new tests covering the signature-invalid AC (revoked / unknown / timeout were already covered):
DERParse_CRL_InvalidSignature_RejectedByOpenSSL— builds a valid CRL signed with key A, callsX509_CRL_verifywith key B's public key, asserts return ≤ 0OCSP_InvalidSignature_RejectedByOpenSSL— XORs the last byte of a DER-encoded OCSP request blob (^= 0xFF, flips all bits to invalidate trailing ASN.1 TLV without truncation), feeds it tod2i_OCSP_RESPONSE, asserts parse failure or non-successful status.github/workflows/plugin-security-crl-ocsp-ci.ymlType of Change
Testing
📚 Research & Knowledge (wenn applicable)
/docs/research/angelegt?/docs/research/implementation_influence/eingetragen?Relevante Quellen:
Checklist
Original prompt
This section details on the original issue you should resolve
<issue_title>Plugin Security: CRL and OCSP Certificate Revocation Checking</issue_title>
<issue_description>### Context
This issue implements the roadmap item 'Plugin Security: CRL and OCSP Certificate Revocation Checking' for the acceleration domain. It is sourced from the consolidated roadmap under 🟠 High Priority — Near-term (v1.5.0 – v1.8.0) and targets milestone v1.8.0.
Primary detail section: Plugin Security: CRL and OCSP Certificate Revocation Checking
Goal
Deliver the scoped changes for Plugin Security: CRL and OCSP Certificate Revocation Checking in src/acceleration/ and complete the linked detail section in a release-ready state for v1.8.0.
Detailed Scope
Plugin Security: CRL and OCSP Certificate Revocation Checking
Priority: High
Target Version: v1.8.0
plugin_security.cppcontains two complete stub methods for certificate revocation:PluginSecurityVerifier::checkCRL()(line 598): extracts CRL distribution points but never fetches or validates the CRL — the body is a comment block listing the 4 required steps; when revocation checking is configured it fail-safes tofalse(line 636) and warns"actual CRL checking not implemented".PluginSecurityVerifier::checkOCSP()(line 654): identical structure — OCSP responder URLs are extracted but no OCSP request is built or sent; also fail-safes tofalse(line 691).EnhancedPluginSecurityVerifier::verifyCertificateChain()(line 1036–1037) emitsTHEMIS_WARN("Revocation checking configured but not yet implemented").This means any GPU plugin with a revoked code-signing certificate will pass security validation when
requireRevocationCheck = false(the default), and will fail to load with an opaque error whenrequireRevocationCheck = true, with no actionable diagnostic.Implementation Notes:
[ ]ImplementcheckCRL()inplugin_security.cpp: (1) for each CRL distribution point URL, perform an HTTP GET usinglibcurlorWinHttp; (2) parse the DER-encoded CRL with OpenSSLd2i_X509_CRL; (3) verify the CRL signature against the issuer certificate; (4) callX509_CRL_get0_by_cert()to check the target certificate's serial number; (5) validate CRLthisUpdate/nextUpdatetimestamps. Honour a configurable timeout (default 5 s) to prevent hangs on unreachable endpoints.[ ]ImplementcheckOCSP()inplugin_security.cpp: (1) build an OCSP request withOCSP_REQUEST_new()+OCSP_request_add0_id(); (2) POST to each OCSP responder URL via HTTP; (3) parse the response withOCSP_response_status()andOCSP_resp_find_status(); (4) verify the responder's signature; (5) checkthisUpdate/nextUpdatebounds.[ ]Implement PE certificate table extraction inEnhancedPluginSecurityVerifier::extractSigningCertificate()(line 1092): parse the PE optional header's DataDirectory[IMAGE_DIRECTORY_ENTRY_SECURITY], extract the WIN_CERTIFICATE structure, and return the embedded PKCS#7 blob as a DER byte string. Currently the method detects the PE magic bytes but returns without extracting the cert (comment: "extraction not fully implemented").[ ]Cache CRL/OCSP results per certificate serial number with a configurable TTL (default: CRLnextUpdate, OCSP 1 h) to avoid per-load network round trips.[ ]Add unit tests with a mock HTTP server (or pre-fetched fixtures) for both CRL and OCSP paths; cover revoked-cert, unknown-cert, network-timeout, and signature-invalid cases.Security Note: Until this is implemented, plugin revocation is not enforced even when
requireRevocationCheck = true. The fail-safe behaviour (returningfalse) prevents revoked plugins from loading only when the calling code actually checks thecheckCRL()/checkOCSP()return value;verifyCertificateChain()currently bypasses both checks with a warning.Acceptance Criteria
PluginSecurityVerifier::checkCRL()(line 598): extracts CRL distribution points but never fetches or validates the CRL — the body is a comment block listing the 4 required steps; when revocation checking is configured it fail-safes tofalse(line 636) and warns"actual CRL checking not implemented".PluginSecurityVerifier::checkOCSP()(line 654): identical structure — OCSP responder URLs are extracted but no OCSP request is built or sent; also fail-safes tofalse(line 691).EnhancedPluginSecurityVerifier::verifyCertificateChain()(line 1036–1037) emitsTHEMIS_WARN("Revocation checking configured but not yet implemented").checkCRL()inplugin_security.cpp: (1) for each CRL distribution point URL, perform an HTTP GET usinglibcurlorWinHttp; (2) parse the DER-encoded CRL with OpenSSLd2i_X509_CRL; (3) verify the CRL signature against the issuer certificate; (4) callX509_CRL_get0_by_cert()to check the target certificate's serial number; (5) validate CRL...💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.