Certificate Chains
Validate trust paths.
Certificate Chains is a free Cyber Security Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cyber Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Is a Certificate Chain?
A certificate chain (or chain of trust) is the ordered list of certificates linking a server's leaf certificate up to a trusted root certificate.
Each certificate is signed by the one above it.
The Three Links
A typical chain has three parts:
- Leaf (end-entity) certificate for the actual server.
- Intermediate certificate(s) that signed the leaf.
- Root certificate that signed the intermediate.
How Validation Walks the Chain
To validate, a client checks each signature going up:
- The root's public key verifies the intermediate.
- The intermediate's public key verifies the leaf.
If every signature checks out and ends at a trusted root, the chain is valid.
Inspecting a Live Chain
You can view the chain a server presents using OpenSSL's s_client.
openssl s_client -connect example.com:443 -showcertsIssuer and Subject Linking
Chains link by matching fields: a certificate's Issuer equals the Subject of the certificate above it.
openssl x509 -in leaf.pem -noout -issuer -subjectThe Missing Intermediate Problem
A very common error is a server sending only its leaf and forgetting the intermediate.
Some clients then cannot build a path to the root and report an untrusted certificate, even though everything is technically valid.
Building the Full Chain
Servers should send the leaf plus all intermediates (but usually not the root, which clients already have).
This combined file is often called fullchain.pem.
cat leaf.pem intermediate.pem > fullchain.pemVerifying Against a Root
You can verify a chain locally by supplying the trusted root.
openssl verify -CAfile root.pem -untrusted intermediate.pem leaf.pemPath Validation Rules
Validation is more than signatures. The client also checks:
- Each certificate is within its validity dates.
- The chain is not revoked.
- CA certificates have the CA flag set in basic constraints.
- Key usage and name constraints are respected.
Cross-Signing
Sometimes a new root is not yet trusted everywhere. Cross-signing lets an older, widely trusted root also sign the new intermediate.
This creates multiple valid paths, improving compatibility with older devices.
Why Chains Fail
Common chain failures include:
- Missing intermediate certificate
- Expired certificate anywhere in the path
- Wrong order in the chain file
- Untrusted or distrusted root
Quick Check
A server presents only its leaf certificate and some clients report it as untrusted. What is the most likely cause?
Recap
You learned how a certificate chain links a leaf to a trusted root through intermediates.
- Validation walks the chain, verifying each signature, dates, and revocation.
- Servers should send the full chain to avoid missing-intermediate errors.
- Cross-signing improves compatibility.
Next, we cover the operational tasks of managing certificates.
Frequently asked questions
Is the “Certificate Chains” lesson free?
Yes — the full text of “Certificate Chains” is free to read here on the web, and the Cyber Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cyber Security Academy course, upgrade to CoddyKit PRO.
What will I learn in “Certificate Chains”?
Validate trust paths. You practise Cyber Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cyber Security Academy?
No prior experience is required. Cyber Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Certificate Chains” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cyber Security Academy lesson?
Yes. Every Cyber Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Public Key Infrastructure
- Certificate Authorities
- Certificate Chains
- Managing Certificates