Handshake failures are common TLS connection problems. This guide explains how to diagnose and resolve them.
1. Causes of handshake failure
1. Protocol mismatch
The client and server do not support a common TLS version.
2. Cipher suite mismatch
The client and server have no cipher suite in common.
3. Certificate problems
The certificate is expired, invalid, or untrusted.
4. Network problems
The connection is unstable or blocked by a firewall.
2. Diagnosis
1. Test with OpenSSL
openssl s_client -connect example.com:443 -servername example.com
2. Review server logs
Check the NGINX or Apache error logs.
3. Use a TLS testing tool
Test the TLS configuration with SSL Labs.
3. Resolution
1. Protocol problems
Ensure that the server supports a secure TLS version also supported by the client.
2. Cipher suite problems
Configure mutually supported secure cipher suites on the server.
3. Certificate problems
Renew the certificate or replace it with one from a trusted CA.
4. Network problems
Check network connectivity and firewall settings.
Conclusion
Handshake failures usually result from incompatible protocols or ciphers, certificate problems, or network issues. Targeted checks help identify and correct the cause.