feat(tls): implement OCSP stapling / --cert-status support#134
Merged
jonwiggins merged 1 commit intomainfrom Mar 28, 2026
Merged
feat(tls): implement OCSP stapling / --cert-status support#134jonwiggins merged 1 commit intomainfrom
jonwiggins merged 1 commit intomainfrom
Conversation
Implement OCSP certificate status verification (OCSP stapling) across all layers of the project: - Add `verify_status` field to `TlsConfig` (default: false) - Add `OcspCheckingVerifier` wrapper that requires non-empty OCSP stapled responses from TLS servers during handshake - Add `ssl_verify_status()` method to `Easy` handle - Wire `--cert-status` CLI flag (previously a no-op) to enable OCSP verification, failing with exit code 91 if the server doesn't provide a stapled OCSP response - Add `SslInvalidCertStatus` error variant mapping to `CURLE_SSL_INVALIDCERTSTATUS` (91) - Add `CURLOPT_SSL_VERIFYSTATUS` (232) to the FFI layer - Report "OCSP-stapling" in `--version` Features output Closes #123 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
OcspCheckingVerifierthat wraps the standard WebPKI verifier and requires non-empty OCSP stapled responses--cert-statusCLI flag from no-op to functional, enabling OCSP verification that fails with exit code 91 (CURLE_SSL_INVALIDCERTSTATUS) when the server doesn't staple an OCSP responseCURLOPT_SSL_VERIFYSTATUS(232) to the FFI layer with proper error mappingSslInvalidCertStatuserror variant and report "OCSP-stapling" in--versionFeaturesCloses #123
Test plan
cargo fmt -- --checkpassescargo clippypasses with no new warningscargo testpasses (345 unit + 8 doc tests)cargo doc --no-depspasses with no warningsurlx --cert-status https://example.comshould fail with exit code 91 if server doesn't provide OCSP staplingurlx --cert-status https://mozilla.org(which staples OCSP) should succeed🤖 Generated with Claude Code