Certificate Chain (Chain of trust, certification path)
Definition
Certificate chains are ordered lists of certificates, from a server's leaf through intermediates to a trusted root, each signed by the next.
A certificate chain is the sequence of certificates a client uses to connect a server's leaf certificate to a root certificate in its trust store. Each certificate's issuer name matches the subject of the next one, and each signature verifies with the next certificate's public key. The server sends the leaf plus intermediates; the client supplies the root and builds the path itself.
Why it matters
Path validation checks every link: signatures, validity dates, basic constraints, name constraints, key usage and, where available, revocation status. If an intermediate is missing, expired or out of order, clients report errors such as "unable to get local issuer certificate". Because of cross-signing a certificate can have more than one valid path, and different clients may pick different ones, which is why the same site can work on a new phone but fail on an old one.
Example
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null
Look at the numbered s: (subject) and i: (issuer) lines: each i: should equal the s: of the next certificate.
Common misconceptions
- The root must be included in the chain file. It is optional and is not trusted just because the server sends it; leaf plus intermediates is enough.
- The order of certificates does not matter. Put the leaf first, then each issuer in turn; some clients tolerate disorder, others do not.
- A valid chain means the certificate matches the hostname. Chain validation and hostname checking are separate steps, and both must pass.