第 5 章,共 8 章

Chains of trust and path validation

How a client walks from leaf to root, why intermediates exist, and why chains break.

约 12 分钟阅读

学完本章后,您将能够

  • Draw a three-level chain and explain each step
  • Explain why servers must send intermediates but not the root
  • List the checks performed during path validation
  • Diagnose the four most common chain failures

01Three levels, one question

A certificate chain answers a recursive question: who vouched for this key, and who vouched for them? Validation stops when it reaches a certificate the client already trusts.

LevelWhat it isWhere it lives
Leaf (end entity)The certificate for your website or deviceSent by the server on every connection
IntermediateA CA certificate signed by the root, allowed to issue leavesSent by the server, usually one or two
RootSelf-signed anchor of trustPre-installed in the client's trust store

02Why intermediates exist

Root keys are enormously valuable and are kept offline, often in hardware, for years. If a root signed every website certificate directly, it would have to be online constantly. Intermediates solve that: they are signed occasionally by the root and then used heavily.

If an intermediate is compromised, the CA can revoke just that intermediate and keep the root. That is exactly what happened in the 2026 eMudhra incident, where several intermediate keys were found to be catastrophically weak.

  • Cross-signing lets a new root borrow trust from an old one while devices catch up
  • Short-lived intermediates reduce the value of a key that leaks
  • Clients differ in which roots and intermediates they ship, which is why one chain can be accepted by a browser and rejected by a Java runtime

03The validation checklist

  1. 1

    Build candidate paths

    Collect certificates from the server and the local store that could connect the leaf to a trusted root.

  2. 2

    Check signatures

    Each certificate must be signed by the key of the next one, up to the trust anchor.

  3. 3

    Check validity dates

    Every certificate in the path must be currently valid.

  4. 4

    Check names

    The requested hostname must appear in the leaf's Subject Alternative Name.

  5. 5

    Check constraints

    Basic Constraints, Key Usage and EKU must permit the intended use; path length limits must hold.

  6. 6

    Check revocation

    Revocation data, where the client uses it, must not mark any certificate as revoked.

Only if every step succeeds is the chain accepted. This is why a single missing intermediate breaks everything, even though the leaf itself is perfectly valid.

04When chains break

FailureCauseFix
Unable to get local issuer certificateServer did not send the intermediateBundle leaf plus intermediates in the server configuration
Certificate expiredRenewal did not run, or the service was not reloadedAutomate renewal and reload, monitor expiry
Self-signed certificate in chainPrivate root not installed on the clientDistribute the root through managed policy
Unknown authorityRoot absent from this runtime's trust storeUpdate the trust store or use a publicly trusted chain
openssl s_client -connect shop.example.com:443 -servername shop.example.com -showcerts < /dev/null | grep -E "^ *[0-9]+ s:|i:"
Inspect the chain a server actually sends

要点回顾

  • A chain is leaf → intermediate(s) → root, with the root already trusted by the client
  • Servers send the leaf and intermediates; roots stay in trust stores
  • Path validation checks signatures, dates, names, constraints and revocation
  • The most common production failure is a missing intermediate