Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Certificate Chain

Direct answer

A certificate chain links the server (leaf) certificate through intermediate CAs to a trusted root. Servers must send the leaf and intermediates; the client has the root.

When to use this

Use it when some clients fail with "unable to get local issuer certificate" while browsers work.

First 30 seconds

1. openssl s_client -connect <host>:443 -servername <name> -showcerts — how many certs sent?

2. Only the leaf → configure the fullchain file.

3. Order: leaf, then intermediates.

4. Verify: openssl verify -untrusted chain.pem cert.pem.

5. Retest with s_client (Verify return code: 0).

Operational verification

server sends leaf + intermediates → client builds path to a trusted root → validated

Evidence · next step

For Certificates & TLS → Certificate Chain, continue with the first unproven Topic check: Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for Certificate Chain. If that boundary is healthy, advance to the adjacent check: Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Key commandopenssl s_client -connect host:443 -showcerts </dev/null
Scope / prerequisiteUse it when some clients fail with "unable to get local issuer certificate" while browsers work.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

7 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Operational evidence path Verify boundary

leaf → issuer/intermediate(s) → path constraints/key usage → client trust anchor → chain validation → hostname/application checks

Healthy evidence: server presents correct ordered intermediates, client builds to an accepted trust anchor and verification succeeds without fetching unintended paths

Step 2 Verification and output interpretation Verify boundary

Verification chain. leaf → issuer/intermediate(s) → path constraints/key usage → client trust anchor → chain validation → hostname/application checks

Step 3 Specialized verification Verify boundary

Inspect each certificate’s subject, issuer, SAN, validity, key identifier and CA constraints, then use a verifier with the intended trust store and untrusted intermediate set. Test the live endpoint to see what it actually presents. Compare failures from a representative client because path building can differ by platform. Closure requires the real hostname to validate against the intended trust anchors and the service to present a chain that clients can build, not merely that individual files parse.

Step 4 Commands Verify boundary
openssl verify -CAfile root.pem -untrusted intermediate.pem cert.pem
openssl s_client -connect host:443 -showcerts </dev/null
Step 5 Failure modes and next checks Narrow the fault

Suspicious evidence: missing/wrong intermediate, expired intermediate, cross-sign ambiguity, incomplete bundle, client-specific trust difference or chain works locally but not on the real endpoint

Step 6 Special cases and limits Narrow the fault

A self-consistent set of certificate files is not necessarily trusted by a client. The root may be omitted from the server chain and still validate correctly. A browser’s success can be influenced by cached/fetched intermediates that another client lacks. A valid chain does not show the private key matches the leaf or the application serves the intended virtual host. Keep chain construction, trust, hostname and key/service deployment separate.

Step 7 Common mistakes Narrow the fault
  • Serving the leaf without the intermediate.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points

Browsers may fetch missing intermediates; other clients do not. Configure the full chain file (leaf first, then intermediates). Don't include the root.

Key checks
  • openssl x509 -in <cert> -noout -subject -issuer -dates -ext subjectAltName — certificate details
  • openssl s_client -connect <host>:443 -servername <name> </dev/null — live chain and verification
  • openssl verify -CAfile <ca> -untrusted <chain> <cert> — chain validation
  • trust list | head / ls /etc/ssl/certs — system trust store
ReferenceImportant terms & boundaries6 sections · depth on demand

What this shows and what it does not

Chain health is confirmed from the intended client trust context with the actual server-presented chain; local file concatenation alone is not endpoint evidence.

In depth

Certificate chains: building and verifying

Clients trust a server certificate only if they can build a chain from it to a trusted root. Usually that goes through one or more intermediate certificates. RFC 5280 calls this a certification path. The openssl-verify(1) manual page documents verifying chains:

  • -CAfile names the trusted roots.
  • -untrusted supplies intermediates that may be used to build the chain, but aren't trusted by themselves.
  • -show_chain prints the chain that was built.
  • Errors are reported with a depth, where 0 is the leaf certificate and 1 is its issuer.

How servers should send the chain

Server sendsResult
Leaf + intermediate(s)Correct
Leaf onlyBrowsers may cope (AIA fetching), but many clients fail: curl, Java, mobile apps, mail servers
Leaf + intermediate + rootWorks, but the root is unnecessary
Intermediates in the wrong orderSome clients fail

Typical configuration

ServerSetting
nginxssl_certificate points to a fullchain file (leaf first, then intermediates)
Apache 2.4.8+SSLCertificateFile with the leaf followed by the intermediates
Postfixsmtpd_tls_chain_files with key, leaf and chain
HAProxyOne PEM file with key, leaf and intermediates

Diagnosing chain errors

ErrorMeaning
unable to get local issuer certificateNo path to a trusted root: missing intermediate, or unknown CA
self-signed certificate in certificate chainThe chain ends at a root the client doesn't trust
certificate has expiredA certificate in the chain (possibly an intermediate) has expired
invalid CA certificateA certificate in the issuer position isn't a CA
host$ openssl verify -show_chain -untrusted chain.pem www.crt
www.crt: OK
Chain:
depth=0: CN = www.example.net (untrusted)
depth=1: C = US, O = Let's Encrypt, CN = R11 (untrusted)
depth=2: C = US, O = Internet Security Research Group, CN = ISRG Root X1
host$ openssl verify www.crt
CN = www.example.net
error 20 at 0 depth lookup: unable to get local issuer certificate
host$ openssl s_client -connect www.example.net:443 -servername www.example.net -showcerts </dev/null 2>/dev/null | grep -E "^ [0-9] s:| i:"
 0 s:CN = www.example.net
   i:C = US, O = Let's Encrypt, CN = R11
 1 s:C = US, O = Let's Encrypt, CN = R11
   i:C = US, O = Internet Security Research Group, CN = ISRG Root X1
host$ cat www.crt chain.pem > fullchain.pem

Reading the example

Verifying the leaf alone fails with "unable to get local issuer certificate", because the intermediate R11 isn't available. With the intermediate supplied as untrusted, the chain builds to the trusted ISRG root. The live server sends the leaf and the intermediate, as it should.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

How it works at runtime

Certificate Chain is part of Certificates & TLS → Certificate Chain. Certificate Chain covers how a leaf certificate is linked through intermediates to a trust anchor, including server-sent intermediates, path building and alternate chains.

Topic-specific state model. Certificate Chain covers how a leaf certificate is linked through intermediates to a trust anchor, including server-sent intermediates, path building and alternate chains.

Interpretation rule. - Leaf signed by a trusted CA family ≠ client can build a valid chain if intermediates are missing/wrong.

  • Server sending the root certificate ≠ necessary or sufficient for client trust.

Specialized mechanics

A certificate chain links the leaf certificate through one or more intermediates to a trust anchor selected by the verifier. Servers normally present the leaf plus required intermediates; clients generally already possess trust anchors and build/validate a path according to signature, constraints, validity, policy and hostname rules. “Chain order” and “trust” are related but different: presentation supplies candidate intermediates while the client’s trust store decides which root is trusted.

Quick reference

A server must send its leaf certificate plus intermediate(s); clients add the root from their trust store.

openssl s_client -connect web01:443 -servername web01.example.com -showcerts </dev/null | grep -E 's:|i:'
openssl verify -untrusted intermediate.pem -CAfile root.pem leaf.pem
cat leaf.pem intermediate.pem > fullchain.pem      # nginx ssl_certificate

Symptoms of a missing intermediate: browsers may still work (cached/fetched intermediates) while curl, Java and mobile apps fail with "unable to get local issuer certificate". Order matters: leaf first, then intermediates up towards the root.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Limits and how it fails

Primary failure point. Chain health is confirmed from the intended client trust context with the actual server-presented chain; local file concatenation alone is not endpoint evidence.

ReferenceConfiguration & state2 sections · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. Certificate Chain owns path building between leaf and trust anchor.

Specialized lifecycle

Deploy the correct leaf certificate with the necessary intermediate chain and keep roots out of server bundles unless a specific product requires otherwise. Renewals must update both the certificate files and the running service state. When a CA changes intermediates, confirm cross-signing/path behavior for the client population. Maintain trust stores through platform-supported mechanisms rather than copying ad hoc CA files into application directories unless the application explicitly owns an independent store.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

Authoritative/upstream documentation reviewed for bounded claims in Certificates & TLS → Certificate Chain. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.openssl.org/ · confidence 94%
2026-09-13 · vendor docOpenSSL 3.6

Authoritative Linux project/vendor documentation reviewed for bounded reference claims: certificate path validation, trust store and verification-result boundaries. Documentation-based technical verification only; not lab or production-runtime proof. The schema vendor_doc method is used for authoritative project/vendor documentation; deployment applicability remains separate evidence.

Basis: https://docs.openssl.org/3.6/man1/openssl-verify/ · confidence 93%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
certificate chaintls chainintermediate certificate
Embedded reference data

Quick lookup tables

Certificate Chain operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Certificate Chain.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateCertificate Chain covers how a leaf certificate is linked through intermediates to a trust anchor, including server-sent intermediates, path building and alternate chains.Establish exactly what this Topic owns before crossing into another subsystem.
Fast verificationPin host + boot/time + real identity/workload → identify authoritative policy/key/trust source → read back loaded/effective runtime state → reproduce one safe allow/deny/handshake test → correlate audit/service/kernel evidence → locate first failed boundary → make the smallest persistent change → repeat original workload + regression/recovery check.Use the shortest evidence path first; a fast check is a boundary test, not blanket proof.
Verification chainleaf → issuer/intermediate(s) → path constraints/key usage → client trust anchor → chain validation → hostname/application checksTrace requested/configured state through effective state to the observed workload result.
Failure boundaryChain health is proven from the intended client trust context with the actual server-presented chain; local file concatenation alone is not endpoint proof.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux security/trust evidence can establish this proof path: leaf → issuer/intermediate(s) → path constraints/key usage → client trust anchor → chain validation → hostname/application checksUse this observation only for the specific claim it actually supports.
Evidence limitIt does not independently prove unobserved identities, objects, policies, namespaces, endpoints or time periods. Chain health is proven from the intended client trust context with the actual server-presented chain; local file concatenation alone is not endpoint proof.Do not promote a local success signal into end-to-end or adjacent-dependency proof.
Next troubleshooting checkContinue from the first unproven security/trust boundary, capture the adjacent effective state and audit/handshake evidence, make only the demonstrated persistent change, then repeat the original workload plus recovery/regression checks.Continue to the next unresolved boundary while preserving the original test condition.

Certificate Chain · operational reference

Compact Linux state, persistence, verification and boundary reference for fast lookup.

Reference boundaryCertificate Chain
Topic pathCertificates & TLS → Certificate Chain
Runtime stateCertificate Chain covers how a leaf certificate is linked through intermediates to a trust anchor, including server-sent intermediates, path building and alternate chains.
Fast checks- Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for Certificate Chain. - Read back the effective runtime state and precedence rather than assuming an edited file, package state or service status is active. - Reproduce one safe allowed/denied or handshake/access test and correlate kernel/service/audit evidence at the first relevant boundary. - Apply the smallest persistent cause-specific change, then repeat the original test plus an adjacent regression/recovery check.
Verification chainleaf → issuer/intermediate(s) → path constraints/key usage → client trust anchor → chain validation → hostname/application checks Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary.
Failure boundaryChain health is proven from the intended client trust context with the actual server-presented chain; local file concatenation alone is not endpoint proof. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload.
Persistence ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.

Certificate Chain · specialized operational reference

Topic-specific Linux mechanics, lifecycle, proof path and failure-boundary lookup.

Operational boundaryTopic-specific reference
PresentationServer: leaf + required intermediates
TrustClient trust anchor/store selects acceptable root
ValidationSignatures + constraints + dates + hostname
ProofRepresentative client builds intended path to trusted anchor
Confirmation

Confirm action

Continue?