Module 2 · TLS in Practice

Manish Garg
Manish Garg Associate of (ISC)² · RingSafe
Apr 22, 2026
4 min read
Read as

Last updated: April 29, 2026

TLS 1.2/1.3, cipher suites, handshake, certificate validation, HSTS, CT, common misconfigurations, testing with testssl.sh.

TLS (Transport Layer Security) is the protocol that secures nearly every HTTPS, SMTPS, and many other connections. Knowing what version, cipher suites, and configuration to deploy — and how to test them — is essential. This module covers TLS 1.2 / 1.3 in 2026, certificate validation, common misconfigurations, and the testing approach that matters.

TLS versions in 2026

  • TLS 1.0, 1.1 — deprecated, removed from major browsers since 2020. Disable in any service config
  • TLS 1.2 — still acceptable; widespread support; backward compatibility
  • TLS 1.3 — modern default; faster handshake, simpler protocol, fewer footguns. Should be preferred

Mature deployments: TLS 1.2 + 1.3 enabled, all earlier versions disabled.

The handshake (1.3 simplified)

CLIENT                                       SERVER
ClientHello (key_share, cipher_suites, ALPN) →
                                          ← ServerHello + Certificate + Finished
                                            (encrypted from this point)
Finished                                  →
[Application Data]                        ↔

TLS 1.3 reduced the handshake to one round-trip (vs 1.2’s two), simplified cipher suite negotiation, mandatory perfect forward secrecy, removed many legacy options.

Cipher suites — what to enable

TLS 1.3 cipher suite list is short:

  • TLS_AES_256_GCM_SHA384
  • TLS_CHACHA20_POLY1305_SHA256
  • TLS_AES_128_GCM_SHA256

All three are acceptable. Order them based on your server’s hardware (AES-NI present → AES-GCM faster; absent → ChaCha20 faster).

For TLS 1.2 backward compatibility, prefer suites with:

  • ECDHE for key exchange (forward secrecy)
  • AES-GCM or CHACHA20-POLY1305 for authenticated encryption
  • SHA-256 or SHA-384 for HMAC

Examples: ECDHE-ECDSA-AES256-GCM-SHA384, ECDHE-RSA-CHACHA20-POLY1305.

What to disable explicitly

  • SSLv2, SSLv3 (long obsolete)
  • TLS 1.0, 1.1
  • RC4 cipher suites (broken)
  • 3DES suites (small block size, weak)
  • MD5 hashes (broken)
  • NULL ciphers (no encryption)
  • EXPORT-grade ciphers (intentionally weakened)
  • Anonymous cipher suites (no authentication)
  • Static RSA key exchange (no forward secrecy)

Certificate validation — the layered checks

When a client validates a server certificate:

  1. Certificate chain — server cert → intermediate CA(s) → trusted root
  2. Signature verification — each cert in chain is signed by the issuer above
  3. Expiration — certificate is currently valid (notBefore ≤ now ≤ notAfter)
  4. Hostname matching — Subject Alternative Name (SAN) matches the requested hostname
  5. Revocation — certificate hasn’t been revoked (CRL or OCSP check)
  6. Trust anchor — root CA is in the client’s trust store
  7. Constraints — KeyUsage, ExtendedKeyUsage, NameConstraints, BasicConstraints (CA bit) all consistent with use

Skipping any of these is a vulnerability. Common mobile-app bug: skipping hostname matching in custom TrustManager → MITM trivially possible.

Forward secrecy

Forward secrecy means: if attacker captures encrypted traffic today and steals the server’s long-term private key tomorrow, they still can’t decrypt the captured traffic.

Achieved via ephemeral key exchange (ECDHE). Each session generates a fresh keypair; long-term key is only used to authenticate the exchange.

TLS 1.3 mandates forward secrecy. TLS 1.2 supports but doesn’t require — disable static-RSA cipher suites.

Common TLS misconfigurations

  • Self-signed certs in production — trust errors; MITM enabler if users click through
  • Wildcard certs over-scoped — *.example.com used widely; one compromise affects all subdomains
  • Cert pinning misconfigured — locks app to a single cert; cert renewal becomes a release event
  • Mixed content — HTTPS page loading HTTP resources; many browsers block, some don’t, attack surface remains
  • HSTS missing — HTTP Strict Transport Security header tells browser “always use HTTPS”; without it, downgrade attacks possible
  • HSTS without preload — first connection still vulnerable; consider preload list submission for max security
  • OCSP stapling missing — every client makes its own OCSP query; slower and leaks browsing patterns
  • SNI required but client doesn’t send it — some legacy clients (older Java) don’t send Server Name Indication; server returns wrong cert

Testing TLS — testssl.sh and beyond

# testssl.sh — comprehensive TLS audit
testssl.sh https://target.com

# Output covers: protocols enabled, cipher suites, vulnerabilities,
# cert chain, HSTS, OCSP stapling, etc.

# SSL Labs (browser): https://www.ssllabs.com/ssltest/
# Same checks; A+ grade is the realistic target

# nmap ssl-* scripts
nmap --script ssl-enum-ciphers,ssl-cert -p 443 target.com

# OpenSSL for manual inspection
openssl s_client -connect target.com:443 -servername target.com -showcerts

Certificate Transparency (CT)

All publicly-trusted certs (since Apr 2018 from Chrome) must be logged to public CT logs. Implications:

  • Anyone can audit what certs were issued for any domain
  • Mis-issuance is detectable
  • Subdomain enumeration via crt.sh — find subdomains with certs even if no DNS record
  • For defenders: subscribe to CT logs for your domain to detect rogue cert issuance

HSTS — Strict Transport Security

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload

# max-age: how long browser remembers HTTPS-only (1 year recommended)
# includeSubDomains: applies to *.example.com
# preload: opt into hardcoded preload list (chrome, firefox, edge)

# Once preloaded, removal is HARD — test thoroughly first

HPKP is dead, don’t use it

HTTP Public Key Pinning (HPKP) was deprecated and removed from browsers due to operational risks (one mistake bricks your site). Use Certificate Transparency monitoring instead.

mTLS for service-to-service

Mutual TLS authenticates both parties via certificates. Common in:

  • Service mesh (Istio, Linkerd) for in-cluster auth
  • B2B integrations
  • IoT devices to cloud
  • Banking, payment networks

Operational considerations: cert lifecycle management for clients (rotation, revocation), trust store management, monitoring of expiry.

Modern TLS deployment checklist

  1. TLS 1.2 + 1.3 enabled; older versions disabled
  2. Strong cipher suites only; no RC4, 3DES, MD5, EXPORT
  3. Forward secrecy mandatory (ECDHE)
  4. Certificate from a recognized public CA (Let’s Encrypt, Sectigo, DigiCert)
  5. Hostnames in SAN match all served names
  6. HSTS header set with reasonable max-age
  7. OCSP stapling enabled
  8. Mixed content eliminated
  9. Cert renewal automated (ACME, certbot)
  10. Monitoring: cert expiry alerts at 30 days; CT log alerts for unauthorized issuance

What the next module covers

Module 3 covers PKI as a system — Certificate Authorities, certificate lifecycle, ACME automation, internal PKI design.

🧠
Check your understanding

Module Quiz · 15 questions

Pass with 80%+ to mark this module complete. Unlimited retries. Each question shows an explanation.

Want this for your team?

Custom team training + practitioner advisory

Beyond the free academy — we run private workshops, vCISO advisory, and red-team exercises tailored to your stack. For Indian SMBs scaling past their first hire.

Book team training call Replies in 4 working hrs · India-only · Senior consultants