OCSP Staple
Build OCSP requests, parse OCSP responses, and extract OCSP responder
URLs from a certificate's Authority Information Access (AIA)
extension. With the fetch feature, also performs an async HTTP/1.1
POST against the responder via hyper.
Features
The crate is structured in three layers:
- Pure functions on cert DER (always compiled) —
extract_ocsp_url,build_ocsp_request,parse_ocsp_response. No IO, unit-testable in isolation. - One async transport function (
fetchfeature) —fetch_ocsp. - One convenience wrapper (
fetchfeature) —fetch_ocsp_for_certruns the whole pipeline (extract → build → fetch → parse).
Transport
Production CAs ship HTTP-only OCSP responders, and OCSP responses
are independently signed. This crate enforces HTTP-only: HTTPS URLs
surface as OcspError::HttpsNotSupported. Pre-fetched responses for
HTTPS-only responders should be delivered through other channels.
Example
use Duration;
use ;
# async
The pure-function path is available without any features:
use ;
#
License
Released under the MIT License © 2026 Canmi