Repository navigation
cert: OCSP verb group (sign | inspect | test) + ocsp-responder profile (#13722) - #14316
Merged
Merged
Conversation
Implements #13722 (fleet CA program #9157, parent #9155) on top of the #13720 foundation. - New leaf profile `ocsp-responder`: P-256, digitalSignature, EKU id-kp-OCSPSigning only, 30-day default validity, and the RFC 6960 §3.2 id-pkix-ocsp-nocheck extension (new LeafProfile flag; engine::issue_leaf adds the extension when set). Issued through the existing `leaf issue` path. - New `ocsp` module: minimal DER writer/reader, hand-rolled SHA-1 (identifier hashes only; FIPS known-answer tests — the sha1 crate is not in the workspace lock), response signing (direct issuer signing or delegated responder signing, responderID byKey, signer cert embedded), response parsing, and verification returning chain::Checks: parse, signature, responder authorization (direct, or issuer signature + OCSP signing EKU + producedAt inside responder validity for delegated), CertID binding against a caller-supplied issuer + serial (the response's own serial is never trusted), freshness with a 300 s clock-skew allowance, and status. - CLI `fleet cert ocsp sign|inspect|test` per the issue's verb set; `doctor` no longer lists ocsp as not built; `explain ocsp` added. SHA-256 CertIDs supported alongside SHA-1; signers may be Ed25519, ECDSA P-256/P-384, or RSA issuers/responders. Evidence: - cargo test -p fleet-cert: 24 unit + 7 hierarchy + 3 new OCSP integration tests pass (responder profile shape pinned against an openssl oracle; synthetic e2e asserts every check including tamper / wrong-serial / stale negatives). - Independent oracle: OpenSSL verifies both a delegated good and a delegated revoked response produced by this code ("Response verify OK", correct status/reason/times) — the exercise caught and fixed two DER tagging bugs (ResponderID is EXPLICIT; certs [0] wraps the SEQUENCE OF encoding). - Live CLI: full ceremony -> leaf + responder issuance -> delegated good sign -> inspect VALID; issuer-signed revoked sign -> inspect VALID; `ocsp test` PASS.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This was referenced Nov 24, 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.
What
Implements the OCSP slice of the fleet CA program: issue #13722 (parent #9157, program #9155), on top of the merged #13720 foundation.
ocsp-responder— P-256, digitalSignature, EKU id-kp-OCSPSigning only, 30-day default validity, plus the RFC 6960 §3.2 id-pkix-ocsp-nocheck extension (newLeafProfile.ocsp_no_checkflag;engine::issue_leafadds the extension when set). Issued through the existingleaf issuepath.ocspmodule — minimal DER writer/reader; hand-rolled SHA-1 (identifier hashes only, FIPS known-answer unit tests; thesha1crate is not in the workspace lock); response signing (direct issuer signing, or delegated responder signing with responderID byKey and the signer cert embedded); response parsing; verification returningchain::Checks — parse, signature, responder authorization (direct, or issuer-signature + OCSP-signing EKU + producedAt within responder validity for delegated), CertID binding against a caller-supplied issuer + serial (the response's own serial is never trusted on its own), freshness with a 300 s skew allowance, status. SHA-256 CertIDs supported; Ed25519 / P-256 / P-384 / RSA signers.fleet cert ocsp sign|inspect|test— the issue's verb set.doctorno longer listsocspas not built;explain ocspadded; README updated to match.Evidence
cargo test -p fleet-cert: 24 unit + 7 hierarchy + 3 new OCSP integration tests pass. The integration tests pin the responder profile shape against an openssl oracle (EKU OID 1.3.6.1.5.5.7.3.9, NoCheck OID present), assert the synthetic end-to-end (delegated good + revoked, direct good, tamper / wrong-serial / stale negatives), and round-trip sign/parse for SHA-1 and SHA-256 CertIDs.goodand a delegatedrevokedresponse produced by this code —Response verify OK, correct status, reason (superseded) and times. That exercise caught and fixed two real DER tagging bugs before this PR (ResponderID is EXPLICIT-tagged;certs [0]wraps the SEQUENCE OF encoding).ocsp inspectreports VALID (all six checks) → issuer-signed revoked sign → VALID →ocsp testPASS (8/8 checks).Scope note: per spec §4.3 this is the responder core — no OCSP URL is embedded anywhere, and no HTTP serving is added; serving these responses is a deployment of this core.
Closes #13722
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.