Revocation of digital certificates: CRL, OCSP, OCSP stapling

Revocation of digital certificates: CRL, OCSP, OCSP stapling

3 methods of checking the revocation status of a digital certificate.

Digital Certificates can get revoked before expiry due to:

  • The certificate is no longer in use.
  • Details of the certificate have changed.
  • The certificate owner’s private key got compromised.
  • The certificate was stolen from CA.

Certificate Revocation List (CRL)

Many CAs maintain an online CRLdatabase.

Every time a client makes a secure connection to a site, the CA will be contacted and CRL will be downloaded and search through a long revocation list. This is a burden to the client. If the client can’t download the CRL it will by default trust the certificate. This defeats the purpose of revocation status checking. If the CA issues a certificate to a high-traffic website it will result in a large number of requests to the CA.

Online Certificate Status Protocol (OCSP)

This protocol performs a real-time checking of the revocation status of certificates.

  • The web server sends the certificate to the client.
  • The web client gets paranoid and raises an OCSP request to the CA.
  • The OCSP responder uses the certificate’s serial number to check the status and respond with one of these three values: good, revoked, or unknown.

The OCSP uses the CRL to stay updated on the list of certificates to be revoked. This removes the overhead that came with only CRL. Still, there will be a lot of requests to the OCSP responder from the client.

OCSP Stapling

OCSP Stapling shifts the burden from the client to the webserver. The web server checks for the status of certificates.

The web server contacts the OCSP responder regularly and frequently to check the revocation status of the certificate. And the responder sends back a timestamped response signed by the CA. When the client wants to connect to the webserver, the web server sends the timestamped OCSP response stapled with the certificate to the client during the SSL handshake. The webserver can send the same OCSP response to all the requests requiring the same certificate.