OCSP stapling is a TLS extension in which the web server fetches a signed revocation status for its own certificate from the certificate authority and attaches it to the TLS handshake, so the client can confirm that the certificate has not been revoked without contacting the CA directly. In Internet trust, it addresses the privacy, latency and reliability problems of classic Online Certificate Status Protocol checks.
The mechanism is formally called the TLS Certificate Status Request extension, defined in RFC 6066, with a multi-certificate version in RFC 6961 and native support in TLS 1.3 under RFC 8446. Its effectiveness depends heavily on client behavior, which is why the companion OCSP Must-Staple certificate extension was introduced.
How OCSP stapling works in the TLS handshake
OCSP stapling works by moving the status query from the client to the server. Instead of every visitor asking the CA’s OCSP responder about the same certificate, the server asks once, caches the signed OCSP response, and delivers it to every client that requests it during the handshake.
- The server sends an OCSP request for its certificate to the responder URL listed in the certificate.
- The responder returns a response signed by the CA or a delegated responder, stating good, revoked or unknown, with a validity window.
- The server caches that response and refreshes it before the nextUpdate time expires.
- A client includes the status_request extension in its ClientHello.
- The server returns the cached response, in TLS 1.2 as a CertificateStatus message and in TLS 1.3 inside the Certificate message extensions.
- The client verifies the CA signature and the time window before trusting the status.
Because the response is signed by the CA, the server cannot forge a good status. The worst a compromised or misconfigured server can do on its own is omit the staple, which is precisely the gap that Must-Staple closes.
Key fields and timing parameters
The value of a stapled response depends on a few timing fields and signature properties that clients evaluate. The table below lists the fields that matter most in operation.
| Element | Meaning | Typical value or behavior |
|---|---|---|
| certStatus | Revocation state of the certificate | good, revoked or unknown |
| thisUpdate | Time the status was known to be correct | Within the last few hours or days |
| nextUpdate | Time after which the response is stale | Often 4 to 7 days after thisUpdate |
| Responder signature | Proof that the CA issued the status | Signed by the CA or a delegated responder |
| Nonce | Protection against replay | Not used in stapling, since responses are shared |
The absence of a nonce means a stapled response can be replayed until nextUpdate. An attacker holding a revoked certificate and an older good response could therefore present that old response for several days, which is the main residual revocation window of the design.
OCSP stapling compared with other revocation methods
OCSP stapling is one of several ways to communicate certificate revocation, and each differs in privacy, latency and failure behavior. Classic OCSP leaks every visited site to the CA and adds a round trip; certificate revocation lists are large; browser-managed lists cover only selected certificates.
| Method | Who contacts the CA | Privacy impact | Extra client latency |
|---|---|---|---|
| Classic OCSP | Each client | CA sees which sites users visit | One additional request |
| OCSP stapling | The server only | No client data sent to the CA | None |
| Certificate revocation list | Each client or a cache | Low, list is generic | Download of a possibly large file |
| Browser-pushed lists | The browser vendor | Low | None at connection time |
| Short-lived certificates | Nobody, certificate simply expires | None | None |
The industry has moved noticeably in recent years. The CA/Browser Forum made OCSP optional for publicly trusted CAs, and Let’s Encrypt ended its OCSP service in favor of CRLs, which means stapling is unavailable for certificates that list no OCSP responder. Stapling remains relevant wherever CAs still operate responders, particularly for enterprise and commercial certificates.
Configuring OCSP stapling on servers
Enabling OCSP stapling requires a complete certificate chain, outbound access to the responder and a working resolver on the server. Most web servers, load balancers and CDNs support it, but defaults vary, and some implementations fetch the response lazily on the first connection, so the earliest clients receive no staple.
| Check | Why it matters | Symptom if missing |
|---|---|---|
| Issuer certificate available | Needed to build and verify the request | Server logs an OCSP verification error |
| Outbound HTTP to responder | OCSP traffic normally uses plain HTTP | No staple, silent fallback |
| DNS resolver configured | Responder hostname must resolve | Fetch timeouts in server logs |
| Proactive refresh | Avoids serving stale responses | Clients see expired staples |
| Shared cache across workers | Prevents duplicate responder queries | Higher load on the CA responder |
Administrators verify the result by requesting a handshake with status checking enabled, for example with the OpenSSL s_client tool and its status option, and confirming that the output shows an OCSP response with a status of good.
Must-Staple, soft-fail and common pitfalls
The biggest weakness of OCSP stapling is soft-fail behavior: most browsers accept a certificate when no staple is present, so an attacker with a stolen, revoked certificate simply leaves the staple out. The TLS Feature extension, known as OCSP Must-Staple and defined in RFC 7633, marks a certificate so that compliant clients reject connections without a valid staple.
- Enabling Must-Staple without reliable stapling turns a responder outage into a site outage for supporting clients.
- Serving a stale staple after nextUpdate causes hard errors in strict clients.
- Blocking outbound HTTP from servers in hardened networks silently disables stapling.
- Relying on stapling for certificates without an OCSP URL has no effect, since there is nothing to fetch.
- Assuming all clients check staples overestimates protection, because support and enforcement differ widely.
A non-technical view
A website’s certificate is like an ID card. Sometimes an ID card is withdrawn, for instance when it is stolen, so a careful visitor wants to know whether the card is still valid.
Without stapling, every visitor phones the issuing office to ask, which is slow and tells the office where everyone is going. With OCSP stapling, the website collects a fresh, stamped confirmation from the office itself and shows it alongside its ID card. Visitors can check the stamp immediately, and the office never learns who visited.
A concrete example
An online retailer serves about 2 million TLS connections per day from a cluster of eight reverse proxies, using a commercial certificate whose CA still runs an OCSP responder. Before enabling stapling, monitoring showed that some visitors on slow mobile links waited an extra 100 to 300 milliseconds while their browsers queried the CA, and a brief responder outage once caused noticeable checkout delays.
The operations team enables stapling on all proxies, opens outbound HTTP to the responder, configures a shared cache and sets a refresh interval of 12 hours against a 7-day validity window. A handshake test confirms a good status on every node. As a result, revocation checks add no client latency, the CA receives eight queries per refresh cycle instead of millions, and customer browsing data no longer reaches the CA. The team decides not to request Must-Staple until it has a full year of outage-free stapling records.