Complete SSL/TLS Certificate & Handshake Troubleshooting Guide
How to inspect certificate chains, debug handshake negotiation failures, fix common browser warnings, and test SSL health using OpenSSL and automated tools.
In modern web architecture, Transport Layer Security (TLS)—still colloquially called SSL—is mandatory. Without a valid, trusted certificate and an intact cryptographic chain, web browsers like Chrome, Firefox, and Safari block access with alarming full-screen warning banners that destroy user trust and decimate search engine rankings.
01 Anatomy of the TLS 1.3 Handshake
Under TLS 1.3, the cryptographic handshake requires only 1 round-trip time (1-RTT) compared to the 2-RTT required in older TLS 1.2 implementations:
- Client Hello: The browser sends supported cipher suites (e.g.
TLS_AES_256_GCM_SHA384), TLS versions, and the Server Name Indication (SNI) header. - Server Hello & Certificate: The server selects the strongest common cipher, sends its public key share, the leaf certificate, and intermediate CA certificates.
- Signature Verification: The client verifies the digital signature against pre-installed operating system trust stores (such as Mozilla Root CA or Windows CryptoAPI).
- Symmetric Key Generation: Both parties independently derive the session symmetric encryption keys. Encrypted data transmission begins.
02 The 4 Most Common SSL Failures & Fixes
1. Certificate Expired (SEC_ERROR_EXPIRED_CERTIFICATE)
Every SSL certificate has a strict Not After timestamp (industry standards limit validity to a maximum of 398 days, and automated Let's Encrypt certificates expire every 90 days). If your automated renewal cron fails, the certificate becomes invalid.
sudo certbot renew --dry-run
2. Missing Intermediate Certificate (Incomplete Chain)
Web servers must provide not just your domain's certificate (leaf), but also the intermediate certificates bridging your cert to the trusted Root CA. If Nginx points to cert.pem instead of fullchain.pem, desktop browsers may cache the chain and work, while mobile devices and cURL throw unable to get local issuer certificate.
Fix in Nginx: Ensure ssl_certificate /path/fullchain.pem; is used, never cert.pem.
3. Common Name / SAN Mismatch (ERR_CERT_COMMON_NAME_INVALID)
Occurs when the domain requested in the browser does not match the Subject Alternative Names (SAN) listed in the certificate. For instance, if your certificate only covers example.com, visiting www.example.com will trigger this warning.
4. Mixed Content Warnings (Insecure Passive Content)
When an HTTPS webpage loads images, scripts, or stylesheets over unencrypted HTTP (http://...), modern browsers either block the assets or remove the padlock icon. Use Content Security Policy (CSP) headers to automatically upgrade insecure requests:
03 Diagnostic Commands Using OpenSSL
The openssl s_client utility is the definitive tool to diagnose TLS handshakes without browser caching interference:
openssl s_client -connect yourdomain.com:443 -servername yourdomain.com
echo | openssl s_client -servername yourdomain.com -connect yourdomain.com:443 2>/dev/null | openssl x509 -noout -dates -issuer -subject
Test Your Website SSL Certificate Right Now
Check certificate validity, SAN domains, issuer, and expiration days remaining for free.