OCSP stapling

On this page 7

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.

  1. The server sends an OCSP request for its certificate to the responder URL listed in the certificate.
  2. The responder returns a response signed by the CA or a delegated responder, stating good, revoked or unknown, with a validity window.
  3. The server caches that response and refreshes it before the nextUpdate time expires.
  4. A client includes the status_request extension in its ClientHello.
  5. The server returns the cached response, in TLS 1.2 as a CertificateStatus message and in TLS 1.3 inside the Certificate message extensions.
  6. 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.

ElementMeaningTypical value or behavior
certStatusRevocation state of the certificategood, revoked or unknown
thisUpdateTime the status was known to be correctWithin the last few hours or days
nextUpdateTime after which the response is staleOften 4 to 7 days after thisUpdate
Responder signatureProof that the CA issued the statusSigned by the CA or a delegated responder
NonceProtection against replayNot used in stapling, since responses are shared
Important elements of a stapled OCSP response

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.

MethodWho contacts the CAPrivacy impactExtra client latency
Classic OCSPEach clientCA sees which sites users visitOne additional request
OCSP staplingThe server onlyNo client data sent to the CANone
Certificate revocation listEach client or a cacheLow, list is genericDownload of a possibly large file
Browser-pushed listsThe browser vendorLowNone at connection time
Short-lived certificatesNobody, certificate simply expiresNoneNone
Revocation checking approaches

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.

CheckWhy it mattersSymptom if missing
Issuer certificate availableNeeded to build and verify the requestServer logs an OCSP verification error
Outbound HTTP to responderOCSP traffic normally uses plain HTTPNo staple, silent fallback
DNS resolver configuredResponder hostname must resolveFetch timeouts in server logs
Proactive refreshAvoids serving stale responsesClients see expired staples
Shared cache across workersPrevents duplicate responder queriesHigher load on the CA responder
Configuration checks and their purpose

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.