OCSP Stapling Failures: Diagnosing Slow or Broken Responses

OCSP Stapling Failures: Diagnosing Slow or Broken Responses

OCSP stapling failures rarely announce themselves – the site loads, the padlock shows, and nobody notices until a Firefox user hits a revocation error or every TLS handshake quietly gains a few hundred milliseconds. This guide is for sysadmins and DevOps engineers who turned on stapling once and assumed it kept working. It shows how to check whether a staple is actually being sent, why responses become slow or stale, and how to fix the usual causes on Nginx, Apache and HAProxy.

What a Healthy Stapled Response Looks Like

With stapling, the server fetches a signed OCSP response from the certificate authority’s responder, caches it, and attaches it to the TLS handshake. The browser then skips its own revocation lookup. That saves a round trip of roughly 100-500 ms and keeps the CA from seeing which sites each visitor opens. The mechanics are covered in more depth in how OCSP stapling improves SSL performance.

A healthy staple has three properties: cert status “good”, a thisUpdate timestamp in the recent past, and a nextUpdate timestamp still in the future. CAs usually sign responses that are valid for several days, and the CA/Browser Forum Baseline Requirements cap that window at 10 days. Anything outside these bounds is a failure, even if the handshake completes.

Diagnosing OCSP Stapling Failures Step by Step

An experienced SRE starts from the client’s view and works back toward the server. The sequence below finds the cause in most cases:

1. Run openssl s_client -connect example.com:443 -servername example.com -status < /dev/null and look for “OCSP Response Status: successful”. The line “OCSP response: no response sent” means no staple was sent.
2. Repeat the command 3-4 times. Nginx fetches responses lazily and separately for each worker process, so the first handshakes after a reload often come back empty. That’s normal for a minute. If it lasts longer, something is wrong.
3. Confirm the certificate has a responder URL: openssl x509 -in cert.pem -noout -ocsp_uri. Empty output means there is nothing to staple.
4. Query the responder directly from the server itself, wrapped in time: openssl ocsp -issuer chain.pem -cert cert.pem -url http://ocsp.example-ca.com -resp_text. Anything over 2 seconds points to a network or responder problem.
5. Read the web server error log for “OCSP responder timed out” or “OCSP_basic_verify() failed”.

Step 4 is the one people skip, and it’s the one that matters. Running the query from a laptop proves nothing about the server’s own network path. More command-line techniques are covered in checking SSL certificate health from the command line.

Why Responses Go Slow or Break

Egress filtering is the top cause. OCSP responders serve plain HTTP on port 80, and hardened DMZ networks often allow outbound 443 only. A typical case: a firewall policy cleanup goes out on a Tuesday, and three weeks later someone notices the Nginx log is full of “OCSP responder timed out (110: Connection timed out) while requesting certificate status”. The site was up the whole time. Stapling had quietly been off since the change.

DNS resolution comes next. Without a resolver directive, Nginx resolves the responder hostname once at startup. Many responders run behind CDNs like Akamai or Cloudflare, where IP addresses rotate. Add resolver 1.1.1.1 9.9.9.9 valid=300s; and resolver_timeout 5s;. If the resolver returns AAAA records but the host has no IPv6 route, add ipv6=off to that line. Otherwise every other lookup stalls.

Verification failures happen when ssl_stapling_verify on is set but ssl_trusted_certificate doesn’t contain the intermediate and root. Nginx throws the response away and logs OCSP_basic_verify() failed.

Apache has its own quirks. mod_ssl fetches the response during the handshake when its cache is empty, so the unlucky first visitor waits up to SSLStaplingResponderTimeout – 10 seconds by default. Lower it to 3-5 seconds. Also set SSLStaplingReturnResponderErrors Off. When it’s on (the default), Apache passes responder errors such as “tryLater” straight to clients.

HAProxy before version 2.8 needed an external cron job to refresh .ocsp files. When that job dies, HAProxy keeps stapling the old response until it expires, and Firefox then shows SEC_ERROR_OCSP_OLD_RESPONSE. From 2.8 onward, set ocsp-update on in the crt-list and let HAProxy refresh the response itself.

Myth: “ssl_stapling on” Means Stapling Works

The directive asks the server to try stapling. It doesn’t guarantee a staple is ever sent. Nginx falls back to no staple without any visible error, and browsers just carry on.

A second myth is that a stapling failure takes the site down. Normally it doesn’t, because revocation checking soft-fails. The exception is certificates carrying the OCSP Must-Staple extension (RFC 7633). Firefox refuses those connections when no valid staple arrives. Chrome doesn’t run live OCSP checks at all – it relies on CRLSets. That means a team testing only in Chrome will never see the problem.

How the Industry Shift Away from OCSP Changes Diagnosis

CA/B Forum ballot SC-063 (2023) made OCSP optional for publicly trusted CAs and CRLs mandatory. Let’s Encrypt followed through: it stopped accepting Must-Staple requests in early 2025, removed OCSP URLs from new certificates in May 2025, and shut down its responders in August 2025.

For any Let’s Encrypt certificate issued since then, Nginx logs a warning that the certificate has no OCSP responder URL and stapling is ignored. That is expected behavior, not a fault. Fleets that mix issuers will show stapling on some hosts and not on others. Diagnosis has to start by checking which issuer each certificate comes from. For the wider trade-offs, see CRL vs OCSP and which to use.

Internal PKI is a separate edge case. An AD CS OCSP responder that is reachable only inside the corporate network works fine for internal servers. Edge servers in a separate segment may need an explicit firewall rule or a forward proxy before they can staple at all.

Common Mistakes When Fixing Stapling

The first mistake is testing once right after a reload. One empty result from a fresh Nginx worker gets reported as an outage. One lucky result after a fix gets reported as success. Test across several connections and again an hour later.

The second is allowing outbound port 80 to a single responder IP. When the CDN rotates addresses, the rule stops matching and stapling fails again weeks later. Allow by hostname through a forward proxy or a DNS-aware firewall.

The third is turning off ssl_stapling_verify to make the log errors go away. That hides a broken trust chain and can let the server staple a response clients will reject. Fix the trusted certificate bundle instead.

FAQ

Does a failed OCSP staple make my site inaccessible?
Usually not. Browsers soft-fail and fall back to their own checks or skip revocation checking. The exception is Must-Staple certificates, where Firefox blocks the connection.

Why does openssl show “no response sent” right after restarting Nginx?
Nginx fetches the OCSP response on demand, separately for each worker process. The first connections after a restart or reload often get no staple while the fetch runs. Retry after 30-60 seconds before you assume it’s broken.

Should I still enable stapling if my certificate has no OCSP URL?
It does no harm, but there’s nothing to staple. With certificates from issuers that have dropped OCSP, such as Let’s Encrypt, revocation status now reaches clients through CRLs and browser mechanisms like CRLSets and CRLite.

Keeping Staples Fresh Long Term

To check stapling, check three things: whether a staple is sent, whether it’s fresh, and whether it verifies. Run the openssl -status check on a schedule, not only after changes. Alert when the nextUpdate timestamp is less than 48 hours away or when several consecutive handshakes come back without a staple. Keep the responder’s network path in your firewall change reviews. Most stapling outages trace back to a network change made by someone who never knew the web servers depended on outbound port 80.