Production Security

TLS Certificate Chain Debugging Guide

Diagnose incomplete TLS chains, wrong virtual hosts and trust-store failures using reproducible client and server evidence. Last updated September 19, 2026.

Diagnose incomplete TLS chains, wrong virtual hosts and trust-store failures using reproducible client and server evidence. This reference is written for developers who need practical validation behavior, reviewable rules and safe examples rather than copied snippets with no explanation.

Recommended workflow

StepWhy it matters
Send the server nameUse SNI so the endpoint returns the certificate for the intended virtual host.
Inspect the served chainCheck leaf, intermediate order, issuer relationships and unexpected duplicates.
Verify identity and timeMatch SAN names and validity dates against the client clock.
Compare trust contextsBrowser, container, JVM and operating-system stores may trust different roots.

Starter snippet

openssl s_client -connect example.com:443 -servername example.com -showcerts

Review checks

Common mistakes

Validation should help users correct input while protecting systems from bad data. Keep syntax checks, product policy, security review and deliverability checks separate.

Related Formalint references

Continue with Tls Certificate Debugging Guide, Ssl Renewal Debugging Guide, cURL TLS Debugging.