Skip to content

cert: OCSP verb group (sign | inspect | test) + ocsp-responder profile (#13722) - #14316

Merged
dezren39 merged 1 commit into
mainfrom
cert/13722-ocsp-verbs
Nov 24, 2026
Merged

dezren39 merged 1 commit into
mainfrom
cert/13722-ocsp-verbs

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What

Implements the OCSP slice of the fleet CA program: issue #13722 (parent #9157, program #9155), on top of the merged #13720 foundation.

  • New leaf profile 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 (new LeafProfile.ocsp_no_check 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 unit tests; the sha1 crate 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 returning chain::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.
  • CLI fleet cert ocsp sign|inspect|test — the issue's verb set. doctor no longer lists ocsp as not built; explain ocsp added; 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.
  • Independent oracle: OpenSSL verifies both a delegated good and a delegated revoked response 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).
  • Live CLI run: full ceremony → server leaf + responder issuance → delegated good sign → ocsp inspect reports VALID (all six checks) → issuer-signed revoked sign → VALID → ocsp test PASS (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-bot with what you need.

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.
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dded33e9-7624-4e05-8d17-99034a9a1b86

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dezren39
dezren39 merged commit 65cf7bb into main Nov 24, 2026
2 checks passed
@dezren39
dezren39 deleted the cert/13722-ocsp-verbs branch November 24, 2026 11:14
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.

cert: OCSP verb group (§6.1)

1 participant