Course contentsShow
← Computer Science
Lesson 1538 of 2,87235. Application Layer ProtocolsFree lesson

Certificate Revocation: CRL and OCSP

Mechanisms for invalidating compromised certificates before their expiration date.

Certificate Revocation: CRL and OCSP

You'll learn: How digital certificates are invalidated before they expire when their security is compromised or no longer trusted.

The Problem: What If a Certificate Is Bad Before It Expires?

Digital certificates have expiration dates (often years away), but sometimes they must be invalidated early—perhaps the server's private key was stolen, the certificate was issued by mistake, or the organization changed ownership. Simply waiting for expiration isn't safe. We need mechanisms to revoke certificates immediately.

Think of it like a driver's license: even though it's valid for four years, if you commit a serious violation, the DMV can revoke it before expiration. Other parties (police, banks) need a way to check if your license is still valid right now.

Two Main Revocation Mechanisms

Certificate Revocation Lists (CRL)

A CRL is a signed list published by a Certificate Authority containing serial numbers of all revoked certificates. Clients periodically download this list and check if a certificate appears on it.

Pros: Simple concept, works offline once downloaded.
Cons: Lists grow large over time, clients must download the entire list regularly, and there's a delay between revocation and download.

Online Certificate Status Protocol (OCSP)

OCSP lets clients query a CA's server in real-time: "Is certificate X still valid?" The server responds with "good," "revoked," or "unknown."

Pros: Real-time status, no large downloads.
Cons: Requires an active connection, creates privacy concerns (CA sees which sites you visit), adds latency to HTTPS handshakes, and introduces a single point of failure.

Modern browsers use variations like OCSP stapling (servers pre-fetch their own OCSP response and include it in the TLS handshake) to improve performance and privacy.

Key Takeaway: Certificate revocation ensures compromised certificates are invalidated before expiration using CRLs (downloadable lists) or OCSP (real-time queries), protecting users from trusting certificates that should no longer be trusted.