OCSP
OCSP
Online Certificate Status Protocol (OCSP) is a web service protocol that allows a client to query
the CA for the revocation status of a single certificate. The CA runs a server called OCSP Responder so
that the client can query the server by locating the URL in a certificate, which reduces the overhead of
CRLs.
How it works
An OCSP client sends a status request to an OCSP responder and waits to accept the certificates
until the responder provides a response.
OCSP Request
Protocol version
Service Request
Upon receiving the request, the OCSP responder checks if the predefined conditions are met.
These conditions are:
It returns a definitive response if all of the above conditions are met, and produces an error message
otherwise.
OCSP Response
An OCSP response can be of various types, but there is only one kind of OCSP response is
supported by all OCSP servers and clients. A basic OCSP response contains the following information:
Optional extensions
Good
A certificate status of “good” shows that the certificate is valid for use. At a minimum, this
shows that a certificate with the corresponding serial number and validity period hasn’t been revoked.
Revoked
The “revoked” state indicates that the certificate has been temporarily or permanently revoked.
If the CA has no record of ever having issued a certificate with the certificate serial number in the
request, then this status may also be returned.
Unknown
The “unknown” state indicates that the responder doesn’t know about the certificate being
requested, usually because the request indicates an unrecognized issuer that is not served by this
responder.
The OCSP response is always signed by the CA to ensure no alteration occurs while the request
is in transit.
Disadvantages
Since the request is sent for each certificate every single time, it can overload the OCSP
responder for high-traffic websites.
Although the above can be solved by using OCSP Stapling, it is not yet supported by all browsers.
If the private key for the server was compromised, an attacker can pose as the server using a
Man in the Middle attack.