What You'll Learn
You'll learn how OCSP provides real-time certificate status checks as a faster alternative to CRLs, including its request/response flow, benefits, and trade-offs.
What is OCSP?
Online Certificate Status Protocol (OCSP) is a protocol that lets clients check whether a certificate has been revoked by asking a CA's OCSP responder in real-time, rather than downloading entire CRLs. Think of it like calling a store to check if your gift card is still valid, instead of downloading a massive list of all invalid gift cards.
OCSP Request/Response Flow
- Client sends request: During TLS handshake, the client contacts an OCSP responder (URL specified in the certificate's "Authority Information Access" extension)
- Request contains: The certificate serial number and issuer information
- Responder replies: Status is
good,revoked, orunknown - Response is signed: The CA signs responses to prevent tampering
This happens during connection establishment, providing up-to-the-moment validation.
Real-Time Validation Benefits
- Immediate revocation detection: No waiting for CRL updates
- Efficient: Only checks one certificate, not downloading megabytes of revocation data
- Scalable: Better for CAs serving millions of certificates
Privacy Concerns
Every OCSP request reveals which website you're visiting to the CA's responder, creating a tracking mechanism. The CA knows when and where you connect, even through encrypted connections.
Performance Impact on TLS Handshakes
OCSP adds latency—typically 100-300ms—to every connection because:
- Extra network round-trip to the OCSP responder
- Potential responder timeouts or failures
- If the responder is down, browsers may fail-open (proceed anyway) for usability
OCSP Stapling (a future optimization) helps by having servers fetch and cache responses.
Key Takeaway: OCSP provides real-time certificate revocation checking through a simple request/response protocol, offering better efficiency than CRLs but introducing privacy concerns and connection delays.