TLS/SSL & HTTPS
The padlock in your browser-how data stays private over the internet.
1The Sealed Envelope Analogy
TLS (Transport Layer Security) encrypts data between client and server. HTTPS = HTTP + TLS. SSL is the old, deprecated predecessor.
2TLS Handshake
Before encrypted communication, client and server agree on encryption:
TLS 1.3 reduced handshake to 1 round trip (1-RTT). TLS 1.2 took 2 round trips. Even faster: 0-RTT resumption.
3Certificates
What's in a Certificate?
- •Domain name (CN)
- •Public key
- •Issuer (CA)
- •Expiration date
- •Digital signature
Certificate Chain
- •Root CA (trusted by browsers)
- •Intermediate CA (signs server certs)
- •Server certificate (your domain)
Let's Encrypt
Free, automated. 90-day certs. Most popular.
DigiCert / Comodo
Paid, longer validity, support, warranties.
4TLS Versions
| Version | Status | Notes |
|---|---|---|
| SSL 2.0/3.0 | Deprecated | Broken. Never use. |
| TLS 1.0/1.1 | Deprecated | Vulnerabilities. Disable. |
| TLS 1.2 | Current | Widely supported. Still secure. |
| TLS 1.3 | Modern | Faster, more secure. Use if possible. |
5Common Issues
Mixed Content
HTTPS page loads HTTP resources. Browser blocks or warns.
Fix: Use HTTPS for all resources. Use protocol-relative URLs.
Certificate Expired
Users see scary warning. Site loses trust.
Fix: Automate renewal with Let's Encrypt + certbot.
Certificate Mismatch
Certificate for wrong domain.
Fix: Ensure CN/SAN matches your domain exactly.
Weak Cipher Suites
Old ciphers are breakable.
Fix: Configure server to use only strong ciphers.
6Best Practices
Enable HSTS
Force HTTPS. Browser remembers and never uses HTTP.
Use TLS 1.2+ Only
Disable TLS 1.0, 1.1, and all SSL versions.
Automate Certificate Renewal
Let's Encrypt + certbot. No manual intervention.
Enable OCSP Stapling
Server provides certificate validity. Faster, more private.
7Key Takeaways
?Quiz
1. Browser shows 'Not Secure'. Most likely cause?
2. TLS 1.3 is faster because: