# What Is OCSP Stapling (TLS Certificate Status Request)?

> OCSP stapling lets a TLS server attach a CA-signed, time-limited OCSP response to its handshake so browsers need not query the CA themselves.

Source: https://ssl.sh/glossary/ocsp-stapling/
Last updated: 2026-11-10

OCSP stapling is a TLS mechanism in which the server, not the browser, fetches a signed [OCSP](https://ssl.sh/glossary/ocsp/) response from the CA and sends it to clients during the [TLS handshake](https://ssl.sh/glossary/tls-handshake/). The client requests it with the status_request extension defined in RFC 6066; in TLS 1.3 the response travels inside the Certificate message. Because the response is signed by the CA and expires, the server cannot forge a "good" status or replay one indefinitely.

## Why it matters
Stapling removes the privacy leak and extra round trip of client-side OCSP: the CA sees one query per server every few hours rather than one per visitor. It only helps when the certificate actually contains an OCSP URL. Since CA/Browser Forum Ballot SC-063 made OCSP optional, some CAs publish only CRLs, and Let's Encrypt removed OCSP URLs from new certificates on 2025-05-07, so for those certificates there is nothing to staple and the server simply skips it.

## Example
nginx configuration:

```nginx
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /etc/nginx/ssl/chain.pem;
resolver 1.1.1.1 8.8.8.8 valid=300s;
```

Check whether a staple is sent:

```bash
openssl s_client -connect example.com:443 -servername example.com -status </dev/null 2>/dev/null | grep -i "ocsp response"
```

`OCSP Response Status: successful` means a staple was sent; `OCSP response: no response sent` means none was. nginx fetches responses lazily, so the first connection after a reload may arrive without a staple.

## Common misconceptions
- **Stapling makes revocation checks hard-fail.** Without [Must-Staple](https://ssl.sh/glossary/must-staple/), a client that receives no staple usually just continues; stapling improves speed and privacy, not enforcement.
- **Enabling stapling breaks sites whose certificate has no OCSP URL.** nginx only logs a warning and completes the handshake without a staple.
- **`ssl_stapling on` is all you need.** nginx also needs a DNS resolver to reach the responder and the issuer certificate to verify the responses it fetches.

## Related terms

- [OCSP](https://ssl.sh/zh/glossary/ocsp/): OCSP 是 RFC 6960 定义的在线证书状态协议，客户端可以向 CA 的响应服务器查询某一张证书当前是有效、已吊销还是未知。
- [OCSP Must-Staple](https://ssl.sh/zh/glossary/must-staple/): OCSP Must-Staple 是一种证书扩展，要求客户端在服务器没有随握手提供有效 OCSP 响应时直接拒绝该证书。
- [TLS 握手](https://ssl.sh/zh/glossary/tls-handshake/): TLS 握手是 TLS 连接开始时的一组消息交换，客户端与服务器在其中协商协议版本和密码套件、验证服务器身份并派生会话密钥。
- [CRL](https://ssl.sh/zh/glossary/crl/): CRL 是由 CA 签名并定期重新发布的证书吊销列表，列出它在证书到期前就已吊销的证书序列号。
- [OCSP Responder](https://ssl.sh/zh/glossary/ocsp-responder/): OCSP Responder 是 CA 运营的 HTTP 服务，负责对 OCSP 查询返回带签名的有效、已吊销或未知状态。
- [证书吊销](https://ssl.sh/zh/glossary/revocation/): 证书吊销是 CA 在证书到期前宣布其作废的操作，通过 CRL 或 OCSP 对外公布，使客户端不再信任这张证书。
