TLS Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=2873
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.
Remember
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.
First checks
openssl x509 -in <cert> -noout -subject -issuer -dates -ext subjectAltName— certificate detailsopenssl s_client -connect <host>:443 -servername <name> </dev/null— live chain and verificationopenssl verify -CAfile <ca> -untrusted <chain> <cert>— chain validationtrust list | head / ls /etc/ssl/certs— system trust store
Commands
openssl x509 -in cert.pem -noout -subject -issuer -dates -ext subjectAltNameopenssl x509 -noout -pubkey -in cert.pemopenssl pkey -pubout -in key.pemopenssl s_client -connect host:443 -tls1_2
Verify in this order
TCP → ClientHello (SNI, versions, ciphers) → server certificate → client validation → session
Where it usually breaks
First mismatch in identity/group resolution → Unix mode/ACL/capability → mount/sandbox constraint → SELinux/AppArmor policy → credential/TLS trust → protected operation; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2873