How would you debug a TLS handshake failure?
AdvancedConceptHTTP, TLS & Certificates
Answer
Check with openssl s_client which step fails. Typical errors: certificate verify failed (chain, expiry or CA), tlsv1 alert protocol version (version mismatch), no shared cipher, handshake failure (SNI missing or client cert required), hostname mismatch.
openssl s_client -connect host:443 -servername host -tls1_2 </dev/null
curl -vI --tlsv1.2 --tls-max 1.2 https://host
Then compare dates, SANs, intermediates, and capture with tcpdump -w to inspect the alert in Wireshark. Also check the system clock.
More on HTTP, TLS & Certificates
What is the structure of an HTTP request and response?BeginnerWhich HTTP status code classes and codes should every DevOps engineer know?BeginnerWhat are the common HTTP methods and which are idempotent?BeginnerWhat changed between HTTP/1.1, HTTP/2 and HTTP/3?IntermediateHow does QUIC differ from TCP+TLS?AdvancedWhat are HTTP keep-alive and connection reuse, and why do they matter?Advanced