What is SSL/TLS?
TLS (successor to the deprecated SSL) is the protocol that encrypts and authenticates connections such as HTTPS between clients and servers.
Definition
Transport Layer Security (TLS) is the cryptographic protocol that sits between TCP (or QUIC, in HTTP/3) and an application protocol such as HTTP, SMTP, or IMAP. It gives a connection three properties: confidentiality (traffic is encrypted), integrity (tampering is detected), and server authentication (the client can verify it reached the real host). SSL was its predecessor; every SSL version is broken and SSL 3.0 was formally deprecated in RFC 7568, and TLS 1.0 and 1.1 were deprecated by RFC 8996. The name "SSL" survives only in product names like "SSL certificate". In a TLS 1.3 handshake (RFC 8446), client and server agree on parameters and derive shared keys with ephemeral (EC)DHE key exchange in a single round trip, which also provides forward secrecy. The server proves its identity with an X.509 certificate chained to a certificate authority the client trusts, and the client checks that the certificate covers the requested hostname and has not expired. After the handshake, data is protected with fast symmetric AEAD ciphers such as AES-GCM or ChaCha20-Poly1305. TLS 1.3 removed legacy options like RSA key transport, CBC modes, and renegotiation. Certificate lifetimes are shrinking. Under CA/Browser Forum ballot SC-081, the maximum validity for publicly trusted certificates fell to 200 days on 15 March 2026 and drops to 100 days in March 2027 and 47 days in March 2029. Let's Encrypt is moving its default from 90-day to 45-day certificates by 2028, so automated renewal is now mandatory in practice.
Reading a real handshake
This is openssl s_client from OpenSSL 3.6 connecting to techloghub.com on 14 Nov 2026, trimmed to the lines that matter:
$ openssl s_client -connect techloghub.com:443 -servername techloghub.com -tls1_3
depth=2 C=US, O=Google Trust Services LLC, CN=GTS Root R4
verify return:1
depth=1 C=US, O=Google Trust Services, CN=WE1
verify return:1
depth=0 CN=techloghub.com
verify return:1
...
Negotiated TLS1.3 group: X25519MLKEM768
...
Verification: OK
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Early data was not sent
Verify return code: 0 (ok)
- depth=0 to depth=2 is the certificate chain from leaf to root: the site's certificate, the WE1 intermediate, then GTS Root R4, which your trust store already holds.
verify return:1means that link checked out. - X25519MLKEM768 is the key exchange: classic X25519 combined with ML-KEM-768, a post-quantum algorithm, so traffic recorded today stays confidential even if large quantum computers arrive later.
- TLS_AES_256_GCM_SHA384 is the cipher suite: AES-256 in GCM mode for encryption and integrity, with SHA-384 in the key schedule.
- Verify return code: 0 (ok) is the line to check in scripts. Anything else names the failure, for example
10 (certificate has expired).
TLS 1.2 vs TLS 1.3
| TLS 1.2 | TLS 1.3 | |
|---|---|---|
| Full handshake | 2 round trips | 1 round trip |
| Resumption | Session IDs or tickets | Pre-shared keys, with optional 0-RTT early data (replayable, so only for idempotent requests) |
| Key exchange | RSA or (EC)DHE | (EC)DHE only, so forward secrecy is always on |
| Cipher suites | Dozens, including CBC modes | Five, all AEAD |
| Server certificate on the wire | Sent in the clear | Encrypted |
When to Use SSL/TLS
Use TLS for every public endpoint, not just login and payment pages; browsers flag plain HTTP as insecure and many web APIs (service workers, geolocation, HTTP/2 in browsers) require a secure context. Enable TLS 1.2 and 1.3 and disable everything older. Automate certificates with an ACME client such as certbot, Caddy, or cert-manager, and monitor expiry because lifetimes keep shrinking. Terminating TLS at a load balancer or CDN is common and fine, but traffic from there to origin should also be encrypted when it crosses networks you do not control. For service-to-service calls inside a cluster, mutual TLS (both sides present certificates) adds client authentication. TLS protects data in transit only; it does nothing for data at rest or for a compromised server.
SSL/TLS in Practice
- Inspect the negotiated protocol, cipher, and certificate chain of a live server: openssl s_client -connect example.com:443 -servername example.com -tls1_3
- Nginx configuration that allows only modern protocol versions: ssl_protocols TLSv1.2 TLSv1.3; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
- Check when a certificate expires so monitoring can alert well before renewal is due: echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -enddate
- A Kubernetes cluster runs cert-manager with a Let's Encrypt ClusterIssuer so each Ingress gets a certificate that renews automatically, with no manual steps as lifetimes shrink to 45 days.
Common Mistakes
- Serving only the leaf certificate without intermediates. Some clients then fail validation; serve the full chain (fullchain.pem), not cert.pem alone.
- Disabling certificate verification in client code (verify=False, rejectUnauthorized: false) to get past an error. This removes server authentication entirely; fix the trust store or hostname instead.
- Renewing certificates manually or on a fixed 60-day cron. With 45-day and shorter lifetimes this breaks; use an ACME client with automatic renewal and ARI support, plus expiry alerts.
- Assuming HTTPS means the site is trustworthy. TLS proves you reached the named domain over an encrypted channel, not that the operator is legitimate.
- Leaving TLS 1.0/1.1 enabled for an old client. Upgrade or isolate that client rather than weakening every connection.