Pcornel
Security · TLS

TLS Troubleshooting

Cheat sheet · https://pcornel.dk/topic.php?topic=4745

Back to the Topic

Answer

TLS troubleshooting follows the handshake: TCP connection, ClientHello with SNI, version and cipher negotiation, certificate chain and revocation checks, key exchange, then the application protocol. openssl s_client -connect host:443 -servername host shows where it fails.

Remember

  • Port open ≠ TLS service healthy.
  • TLS alert ≠ root cause without peer and state context.
  • Handshake success ≠ HTTP/application success.
  • Works in browser ≠ automated client trust/SNI/protocol path is equivalent.

First checks

  • openssl s_client -connect <host>:443 -servername <host> </dev/null — handshake errors
  • testssl.sh <host> — full check
  • curl -v https://<host> — client error text

Commands

openssl s_client -connect <host>:443 -servername <host>
Read current TLS state for a bounded verification step.

Verify in this order

client → handshake → validation → session

Where it usually breaks

First mismatch in key/secret generation → storage/rotation → trust/certificate validation → protocol negotiation → cryptographic operation → peer/application verification; preserve identity/policy/pre-state before mutation.

TLS → TLS Troubleshooting proof map

BoundaryEstablishDoes not establish
Scope and intentAsset/data/peer, security property, identity/name, protocol and timeDoes not prove algorithm, key, trust or endpoint correctness
Effective cryptographic stateExact version, algorithm/mode/parameters, key/certificate/path and negotiated resultConfiguration or object presence does not prove correct use
Verification outcomePositive, negative, tamper, expiry/revoke and failure tests correlated with evidenceOne success does not prove every peer, client, path or lifecycle stage
ClosureOriginal operation succeeds; old/unsafe state is retired and regression checks passAdministrative workflow completion alone is not closure

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4745

Confirmation

Confirm action

Continue?