Inspect TLS
Understand the certificate chain
Follow a leaf certificate through intermediate authorities to a locally trusted root.
10 minute lesson
A single certificate rarely stands alone. The certificate for a website is signed by an intermediate CA, and that intermediate is signed by a root CA that your operating system or browser already trusts. Verification means walking that path: leaf, through intermediates, up to a locally trusted root.
The split exists for damage control. Root CA keys are kept offline and used rarely. Day-to-day signing happens with intermediate keys, which can be replaced if something goes wrong without every device on earth updating its trust store.
Servers normally send the leaf certificate and required intermediate certificates. Clients already hold trusted roots and build a verified path.
Show every certificate returned by a server:
openssl s_client -connect example.org:443 -servername example.org -showcerts </dev/null
-showcerts prints each certificate the server sent as a PEM block, in the order presented. Above each block you get the subject and issuer:
0 s:CN = example.org
i:C = US, O = DigiCert Inc, CN = DigiCert Global G3 TLS ECC SHA384 2020 CA1
1 s:C = US, O = DigiCert Inc, CN = DigiCert Global G3 TLS ECC SHA384 2020 CA1
i:C = US, O = DigiCert Inc, CN = DigiCert Global Root G3
Certificate 0 is the leaf, the one for the site itself. Certificate 1 is an intermediate: notice its s: subject matches the leaf’s i: issuer exactly. That subject-to-issuer linkage is the chain. The intermediate’s own issuer points at a root.
Count the presented certificates and identify leaf versus intermediate. The trusted root may be absent because clients already store it — servers are not expected to send it, and clients ignore it if they do.
This structure explains a whole class of production failures. A server configured with only the leaf works in browsers that cached the intermediate elsewhere, then fails in curl, mobile apps, or CI with an “unable to get local issuer certificate” error. You will reproduce and fix that failure later in this course.
A chain is not trusted because certificates merely exist. Signatures, constraints, names, time, and local trust must all validate. Any single broken link fails the whole path.
Lesson completed