Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

TLS Troubleshooting

Direct answer

TLS troubleshooting finds why a handshake fails: name mismatch, expired certificate, incomplete chain, untrusted CA, protocol or cipher mismatch, SNI or client-certificate requirements.

When to use this

Use it when clients report certificate or handshake errors.

First 30 seconds

1. openssl s_client -connect host:443 -servername host — verify code and error?

2. Name/expiry → certificate details.

3. Chain → -showcerts.

4. Protocol → -tls1_2 / -tls1_3; cipher lists.

5. Client side: clock, trust store, proxy intercepting TLS.

Operational verification

TCP → ClientHello (SNI, versions, ciphers) → server certificate → client validation → session

Evidence · next step

For Certificates & TLS → TLS Troubleshooting, 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 TLS Troubleshooting. 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 -servername host -tls1_2
Scope / prerequisiteUse it when clients report certificate or handshake errors.
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.

5 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

client + DNS/path → TCP → SNI/protocol/cipher → server certificate/key/chain → client trust/hostname/time → TLS handshake → application protocol/status

Healthy evidence: same endpoint/SNI/client trust context completes verification, expected certificate/chain is presented and original application request succeeds securely

Step 2 Verification and output interpretation Verify boundary

Verification chain. client + DNS/path → TCP → SNI/protocol/cipher → server certificate/key/chain → client trust/hostname/time → TLS handshake → application protocol/status

Step 3 Commands Verify boundary
openssl s_client -connect host:443 -servername host -tls1_2
curl -v https://host
openssl x509 -noout -dates -in cert.pem
Step 4 Failure modes and next checks Narrow the fault

Suspicious evidence: wrong SNI endpoint, unsupported protocol/cipher, stale certificate, key mismatch, missing intermediate, unknown CA, hostname/time failure, proxy interception or application still fails after handshake

Step 5 Common mistakes Narrow the fault
  • Blaming TLS when DNS points to the wrong server.
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

Use openssl s_client with -servername and read the verify return code. Test the protocol with -tls1_2/-tls1_3. Check the client's clock and trust store.

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 & boundaries5 sections · depth on demand

What this shows and what it does not

TLS troubleshooting is resolved when the first failed handshake/trust/application boundary is confirmed and the original client transaction succeeds with normal verification enabled.

In depth

Test exactly what a client sees

$ openssl s_client -connect app.example.com:443 -servername app.example.com -verify_return_error -CAfile /etc/ssl/certs/ca-certificates.crt </dev/null
CONNECTED(00000003)
depth=2 C = US, O = Example Root CA
depth=1 C = US, O = Example, CN = Example Issuing CA
depth=0 CN = app.example.com
---
Certificate chain
 0 s:CN = app.example.com
   i:C = US, O = Example, CN = Example Issuing CA
---
Verify return code: 0 (ok)

The OpenSSL s_client manual documents -servername (sets SNI), -showcerts (prints the chain as sent — explicitly not a verified chain), -verify_return_error (abort on verification failure) and -CAfile (trust anchors).

Verify return codes worth knowing

CodeMeaningUsual fix
0 (ok)Chain verified—
2 / 20 unable to get (local) issuer certificateIntermediate missing from the server's chain, or root not trusted locallyServe the full chain (fullchain.pem); install the root on the client
10 certificate has expiredExpired leaf or intermediateRenew; check all chain members
18 / 19 self-signed certificate (in chain)Private CA not trustedAdd CA to the trust store
62 hostname mismatch (with -verify_hostname)Name not in SANReissue with correct SAN

Other checks

QuestionCommand
What the certificate containsopenssl x509 -in cert.pem -noout -subject -issuer -dates -ext subjectAltName
Key matches certificateCompare openssl x509 -noout -pubkey -in cert.pem with openssl pkey -pubout -in key.pem
Protocol supportopenssl s_client -connect host:443 -tls1_2 / -tls1_3
Without SNIOmit -servername — reveals the default certificate
STARTTLS services-starttls smtp / imap / postgres

Trust store on the client

Add a private CA with update-ca-certificates (Debian/Ubuntu, file in /usr/local/share/ca-certificates/) or update-ca-trust (RHEL family, file in /etc/pki/ca-trust/source/anchors/). Applications with bundled stores (Java, some Python environments) need their own update.

*The OpenSSL certificate chain uses example identities and does not represent a captured TLS handshake.*

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

TLS Troubleshooting is part of Certificates & TLS → TLS Troubleshooting. TLS Troubleshooting isolates failures across DNS/path, SNI, protocol/cipher negotiation, certificate/key presentation, chain building, trust store, hostname, time and application-layer authentication.

Topic-specific state model. TLS Troubleshooting isolates failures across DNS/path, SNI, protocol/cipher negotiation, certificate/key presentation, chain building, trust store, hostname, time and application-layer authentication.

Interpretation rule. - TCP connection success ≠ TLS handshake success.

  • TLS handshake success ≠ application request authorized or healthy.

Method

TLS troubleshooting:

openssl s_client -connect host:443 -servername host -brief
openssl s_client -connect host:443 -tls1_2      # test protocol versions
curl -vI https://host/ 2>&1 | grep -E 'SSL|subject|issuer|expire'
nmap --script ssl-enum-ciphers -p 443 host
ErrorCause
certificate has expiredRenewal failed / clock wrong
unable to get local issuer certificateMissing intermediate or unknown private CA
hostname mismatchSAN does not include the name used; SNI missing
handshake failure / no shared cipherProtocol/cipher policy mismatch (e.g. update-crypto-policies on RHEL)
wrong version numberTalking TLS to a plain-HTTP port or vice versa
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. TLS troubleshooting is resolved when the first failed handshake/trust/application boundary is confirmed and the original client transaction succeeds with normal verification enabled.

ReferenceConfiguration & state1 section · depth on demand

Configuration, persistence and lifecycle

Distribution/platform context. TLS Troubleshooting owns end-to-end handshake/trust isolation; hand off to Networking, Certificates, CA trust or application/service topics at the first failing step.

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 → TLS Troubleshooting. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.openssl.org/ · confidence 94%
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.

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
tls troubleshootingssl certificate erroropenssl s_client troubleshooting
Embedded reference data

Quick lookup tables

TLS Troubleshooting operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for TLS Troubleshooting.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateTLS Troubleshooting isolates failures across DNS/path, SNI, protocol/cipher negotiation, certificate/key presentation, chain building, trust store, hostname, time and application-layer authentication.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 chainclient + DNS/path → TCP → SNI/protocol/cipher → server certificate/key/chain → client trust/hostname/time → TLS handshake → application protocol/statusTrace requested/configured state through effective state to the observed workload result.
Failure boundaryTLS troubleshooting closes when the first failed handshake/trust/application boundary is proven and the original client transaction succeeds with normal verification enabled.Stop broad troubleshooting at the first boundary that is not supported by evidence.
Positive evidenceCorrelated Linux security/trust evidence can establish this proof path: client + DNS/path → TCP → SNI/protocol/cipher → server certificate/key/chain → client trust/hostname/time → TLS handshake → application protocol/statusUse 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. TLS troubleshooting closes when the first failed handshake/trust/application boundary is proven and the original client transaction succeeds with normal verification enabled.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.

TLS Troubleshooting · operational reference

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

Reference boundaryTLS Troubleshooting
Topic pathCertificates & TLS → TLS Troubleshooting
Runtime stateTLS Troubleshooting isolates failures across DNS/path, SNI, protocol/cipher negotiation, certificate/key presentation, chain building, trust store, hostname, time and application-layer authentication.
Fast checks- Record exact host, distribution/kernel, boot ID, time window, workload, identity and the authoritative configuration/policy source for TLS Troubleshooting. - 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 chainclient + DNS/path → TCP → SNI/protocol/cipher → server certificate/key/chain → client trust/hostname/time → TLS handshake → application protocol/status Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary.
Failure boundaryTLS troubleshooting closes when the first failed handshake/trust/application boundary is proven and the original client transaction succeeds with normal verification enabled. 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.
Confirmation

Confirm action

Continue?