PKI for FortiGate, Part 5: Revocation, Tested
Part 4 showed a good authentication. This post breaks it on purpose, three ways. Each test is a single change, a fresh IKE negotiation, and the log line that shows what the hub decided. All of it ran on FortiOS 7.6.8, between a hub and one spoke using certificate authentication.
Test 1: revoking a leaf
This one is covered in more detail in the step-ca post, so here is the result and what it means.
I revoked the spoke’s certificate on the CA at 08:13:29. The CA rebuilds its CRL on the spot. The hub fetches that CRL on a timer, and I had set its refresh interval to 300 seconds to see the effect:
| Time | Event | Result |
|---|---|---|
| 08:13:29 | Certificate revoked on the CA | CRL on the CA updated at once |
| 08:15:33 | I cleared the IKE gateway on the hub | The revoked certificate authenticated: validation succeeded, tunnel up |
| 08:22:16 | Cleared again | ***CERTIFICATE IS REVOKED***, validation failed, tunnel down |
Between the revocation and the first clear, the hub evidently had not yet fetched the new list. It picked it up by itself some time before the second clear, with no manual import.
The result to remember: revocation takes effect at the next CRL refresh plus the next IKE authentication. With the default 3600-second interval, a revoked certificate can keep authenticating for up to an hour after you revoke it. An established tunnel is not re-checked at all until it re-authenticates, so it can run for the lifetime of the IKE SA unless you clear it. If you are revoking because a device is compromised, clearing its gateway is part of the procedure:
diagnose vpn ike gateway clear name H1-S1-ISP1
Setting up for the chain tests
The leaf is the easy case. The harder question is what the hub does about the certificates above the leaf. Part 4 showed that it checks the intermediate against a CRL from the root. For that I needed a root CRL, which is a different kind of object to the one step-ca publishes, because the root key never goes near the CA server.
I generated it with openssl on the workstation that holds the root key. The CRL needs a small working directory:
index.txt empty file, the list of revoked certificates
crlnumber a file containing the text 01
openssl.cnf the configuration below
The configuration:
[ ca ]
default_ca = root
[ root ]
database = index.txt
crlnumber = crlnumber
certificate = ../root_ca.crt
private_key = ../root_ca.key
default_md = sha256
default_crl_days = 30
crl_extensions = crl_ext
unique_subject = no
[ crl_ext ]
authorityKeyIdentifier = keyid:always
Then:
openssl ca -config openssl.cnf -gencrl -crldays 180 -out root.crl.pem
openssl crl -in root.crl.pem -noout -text
openssl prompts for the root key passphrase, and the CRL it writes is signed by the root. The key never left the workstation. The relevant lines of the output:
Issuer: CN=Fortinet HomeLab Root CA
Last Update: Nov 7 12:47:50 2026 GMT
Next Update: May 6 12:47:50 2027 GMT
No Revoked Certificates.
An empty CRL is the normal state. A root CRL lists revoked intermediates, and there should almost never be one.
To load it on the hub, paste the PEM into a CRL object:
config vpn certificate crl
edit "ROOT-CRL"
set crl "-----BEGIN X509 CRL-----
...
-----END X509 CRL-----"
next
end
show full-configuration vpn certificate crl | grep -c BEGIN
That count should be 2: the CA’s CRL and the root’s. The hub’s CRL verification setting for the chain, which Part 6 covers properly, was set to the strict value for these tests:
config vpn certificate setting
config crl-verification
set chain-crl-absence revoke
end
end
Test 2: the chain is complete
With both CRLs loaded, the spoke authenticates. Both lookups pass, the intermediate against the root’s CRL and the leaf against the CA’s:
[408] __check_crl-CRL found: THEMIS-CRL
[425] __check_crl-***CERTIFICATE IS GOOD***
[408] __check_crl-CRL found: ROOT-CRL
[425] __check_crl-***CERTIFICATE IS GOOD***
Tunnel up, 1/1. This is the control: the strict setting does not break a working chain.
Test 3: the root CRL is missing
I deleted ROOT-CRL and cleared the gateway. The leaf’s own check still passed. The failure came from the level above:
[1375] fnbamd_cert_auth_copy_cert_status-CRL of cert depth 1 is absent.
ike V=root:0:H1-S1-ISP1:4: certificate validation failed
ike V=root:0:H1-S1-ISP1:4: authentication failed
Tunnel down, 1/0. So chain-crl-absence revoke does what the name says: if any CA above the leaf has no CRL on the device, the chain is rejected. A valid leaf with a valid CRL is not enough.
The message is worth noting. Nothing says “revoked”, and nothing says “root”. The only clue in the IKE log is certificate validation failed. The reason is one line down in the fnbamd output, CRL of cert depth 1 is absent, and depth 1 is the intermediate.
Test 4: the intermediate is revoked
This is the test that matters most for the design. I revoked the intermediate in the root’s CRL, using the throwaway working directory:
openssl ca -config openssl.cnf -revoke ../intermediate_ca.crt -crl_reason keyCompromise
openssl ca -config openssl.cnf -gencrl -crldays 30 -out root-revoked.crl.pem
openssl crl -in root-revoked.crl.pem -noout -text
The CRL now lists the intermediate’s serial with the reason Key Compromise. I loaded it into ROOT-CRL and cleared the gateway:
[408] __check_crl-CRL found: THEMIS-CRL
[425] __check_crl-***CERTIFICATE IS GOOD***
[408] __check_crl-CRL found: ROOT-CRL
[421] __check_crl-***CERTIFICATE IS REVOKED***
ike V=root:0:H1-S1-ISP1:2457: certificate validation failed
ike V=root:0:H1-S1-ISP1:2457: authentication failed
The spoke’s own certificate is GOOD. It was never revoked. The intermediate that signed it is REVOKED, and the spoke is rejected anyway. All 38 attempts in the capture failed the same way and the tunnel stayed at 1/0.
That is the point of revoking at the top. Revoking an intermediate invalidates every certificate it ever issued, including devices you have no reason to distrust. I tested it with one spoke, but the rejection happens at the chain, before the leaf’s identity matters. Recovery is a new intermediate and a new leaf for every device. The root CRL is the emergency lever for a compromised intermediate, and Part 7 covers the procedure for keeping it current.
I reset the working directory afterwards. The real root CRL lists nothing.
The results together
| Test | State of the chain | Log line that explains it | Tunnel |
|---|---|---|---|
| 1 | Leaf revoked, hub CRL not yet refreshed | certificate validation succeeded | Up |
| 1 | Leaf revoked, hub CRL refreshed | CERTIFICATE IS REVOKED at depth 0 | Down |
| 2 | Both CRLs present and clean | CERTIFICATE IS GOOD twice | Up |
| 3 | Root CRL absent | CRL of cert depth 1 is absent. | Down |
| 4 | Intermediate revoked in the root CRL | CERTIFICATE IS REVOKED at depth 1 | Down |
Test 1’s first row is the uncomfortable one. A revoked certificate was accepted and the log showed an ordinary successful authentication, because the hub did not yet hold the new list. Whether a missing or stale CRL fails open or closed is a setting, and Part 6 goes through all of them.