Skip to content
hostcomplex

OCSP and Certificate Revocation

Maarten Soetens 3 min read

What certificate revocation means and why it is needed

OCSP, short for Online Certificate Status Protocol, is a way for a client to ask a certificate authority whether one specific certificate is still good. It is one of the main mechanisms behind certificate revocation, which is the act of declaring a certificate invalid before its expiry date.

Revocation is needed because a certificate can become untrustworthy before it expires. The private key may have been stolen, the certificate may have been issued to the wrong party or the domain may have changed hands. Waiting for the end date is then too slow.

Revocation only works if clients check for it. A revoked certificate that clients keep accepting protects no one, so the checking methods matter as much as the act of revoking.

How browsers check whether a certificate is revoked

The traditional method is the certificate revocation list, or CRL. The certificate authority publishes a signed list of the serial numbers of revoked certificates, and clients download it periodically. CRLs can grow large, so a client may need to fetch a big file just to check one certificate.

OCSP was designed as a lighter alternative. The client sends a query containing the certificate's serial number to an OCSP responder run by the certificate authority and receives a signed answer: good, revoked or unknown. Each check is small, but it adds a network request. It also tells the certificate authority which site the visitor is connecting to.

OCSP stapling moves the check to the server. The web server periodically fetches a signed OCSP response itself and sends it along with the certificate during the TLS handshake. The client gets proof of status without a separate lookup, which improves both speed and privacy.

The limits of revocation checking

Revocation checking is weaker than it sounds. Many clients fail open, meaning they accept the certificate when the responder cannot be reached. An attacker who controls the network could block the check and have a revoked certificate accepted.

For performance and privacy reasons, some browsers no longer perform live OCSP checks for most certificates. Instead they rely on lists of revoked certificates that the browser vendor collects and distributes. These lists cover only a subset of revocations, which is a trade-off between coverage and reliability.

Because of these limits, revocation is best seen as one layer of defense. Short certificate lifetimes and automated renewal reduce the time a bad certificate stays useful, and certificate transparency helps detect certificates that should never have been issued.

Frequently asked questions

What is the difference between a CRL and OCSP?

A CRL is a complete list of revoked certificates that clients download in bulk. OCSP asks about one certificate at a time and returns a single signed answer. CRLs give more privacy but can be large, while OCSP is quicker per check but reveals the lookup to the responder. OCSP stapling lets the server supply the answer instead.

Does a revoked certificate stop working immediately?

Not always. A revocation takes effect when the certificate authority publishes it, but clients only learn about it when they check. Clients that skip checks, or that cannot reach a responder, may keep accepting the certificate. The effect is therefore uneven across browsers and tools, and the issuing certificate authority plays a central role.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.