Revocation, CRL and OCSP¶
The CA records every certificate it issues, and can declare a TLS certificate invalid before it expires: revoke it. It tells others about revocations with a CRL and OCSP.
List certificates¶
On the CA machine:
$ bxp list certificates --config bastionxp-ca.yaml
SERIAL PROFILE VIA NAMES VALID UNTIL STATUS
5aeb9bcb562c6366da208947855600572f621fe1 tls-server api web.example.com 2027-02-13 16:28 valid
545833e6a9b1f0cc7bd575321d063ae492707849 tls-client scep device1.example.com 2026-12-15 15:13 valid
628654a0148dffbe5bb1053964eb9c4693531080 tls-server acme api.example.com 2026-12-01 09:12 revoked 2026-11-15 (superseded)
| Column | Meaning |
|---|---|
SERIAL |
Hex for TLS, decimal for SSH. |
PROFILE |
The certificate profile; bastionxp-ca-server and scep-ra are the CA's own certificates. |
VIA |
How it was obtained: api (token or login), acme or scep; - for the CA's own. It decides how the certificate can be renewed. |
STATUS |
valid, expired, or revoked <date> (<reason>). |
bxp list certificates --revoked shows only the revoked ones.
Revoke a TLS certificate¶
bxp revoke 628654a0148dffbe5bb1053964eb9c4693531080 --reason key-compromise --config bastionxp-ca.yaml
The serial number is in bxp list certificates, in the CA's log, and
in the certificate:
| Reason | When |
|---|---|
unspecified |
No reason given (default). |
key-compromise |
The private key may be in the wrong hands. |
superseded |
Replaced by a new certificate. |
cessation |
No longer needed. |
The running server picks the revocation up within seconds. A revocation cannot be undone.
ACME clients can revoke their own certificates too; see ACME accounts and revocation.
Publish revocations¶
A revoked certificate still looks fine by itself: whoever is shown it has to ask the CA. The CA answers in two standard ways, both signed by the intermediate:
| Address | What it is |
|---|---|
/crl |
The CRL: the list of all revoked certificates. Downloaded from time to time. |
/ocsp |
OCSP (RFC 6960): answers "is this one revoked?" for a single certificate. |
So that programs find them by themselves, give the CA a plain HTTP address for its public information, and say how others reach it:
Every TLS certificate issued from then on names
http://ca.example.com:8080/crl (CRL distribution point) and .../ocsp
(OCSP responder) inside it. Plain HTTP is the usual choice, and safe: the
answers are signed by the CA, and many programs cannot use HTTPS for this.
Only public information is served on that address, nothing that issues
certificates. See Public endpoints.
Note
Only certificates issued after public_url is set carry the
addresses. Renew older certificates to give them the addresses.
Who checks¶
Whether a program checks revocation at all is up to that program. Many do not unless told to:
| Program | Checks? |
|---|---|
| Browsers | Mostly ignore revocation for private CAs. |
curl |
No, unless told (--crlfile). |
| nginx (client certificates) | Only against a CRL file you give it (ssl_crl), which you refresh from /crl with a scheduled job. |
| Go, Java, .NET services | If the application turns it on. |
Check by hand:
openssl ocsp -issuer intermediate.crt -cert web.crt -CAfile root.crt \
-url http://ca.example.com:8080/ocsp
curl -s http://ca.example.com:8080/crl | openssl crl -inform DER -noout -text
For this reason the first line of defence is short-lived certificates: one that expires in a day needs no revocation.
SSH certificates¶
Revoking an SSH certificate only stops its renewal.
The serial number is in bxp list certificates and in
ssh-keygen -L -f <cert>. SSH servers are not told: they do not ask
anybody about certificates. User certificates last hours anyway. For a
host, or to lock a person out at once, remove the access on the servers.
Caching and timing¶
- The running server notices a revocation within 5 seconds: it watches
the database, logs the revocation (
certificate revoked), and signs a new CRL and new OCSP answers. - In between, it reuses what it signed, for up to 5 minutes, so nobody can make it sign in a loop.
- CRLs and OCSP answers to GET requests may be kept by proxies and clients
for 5 minutes (
Cache-Control: max-age=300). - Clients also keep a CRL until its own next update, at most 24 hours.
After replacing the intermediate¶
The CRL and OCSP answers come from the current intermediate. Certificates issued by a replaced intermediate can no longer be revoked: renew them to move them over. See Replace the intermediate.