openssl ocsp
The OpenSSL command that can build OCSP requests, act as a simple OCSP responder, and check the signed answers.
In more detail
As a client it names the issuer and the certificate and writes or sends a request; as a responder it looks the serial number up in a certificate authority's database and signs a reply. When checking a reply it verifies the responder's signature and prints the status, such as good or revoked, with a reason. Working with request and response files makes each step of the protocol visible without a network.
Examples
openssl ocsp -index index.txt -CA ca.pem -rsigner ca.pem -rkey ca.key -reqin request.der -respout response.deropenssl ocsp -respin response.der -issuer ca.pem -cert www.pem -CAfile ca.pem -no_nonceRelated terms
- OCSP — A protocol a client uses to ask a certificate authority's server whether one particular certificate is still valid, receiving a signed answer.
- revocation — Cancelling a certificate before its expiry date, usually because its private key leaked or it was issued wrongly, and telling clients to stop trusting it.
- openssl ca — The OpenSSL command that runs a minimal certificate authority, signing requests, revoking certificates and publishing revocation lists while tracking them in a database file.
- OpenSSL — A widely used toolkit and library for cryptography and TLS, including the openssl command-line tool.
Taught in
- Public Key Infrastructure: X.509 Certificates & CAs — Cybersecurity Fundamentals, GRC & Cryptography