DevTools Logo

TLS Handshake Cheat Sheet

TLS 1.3 and 1.2 handshake steps, cipher suites, certificate validation, and troubleshooting.

Security Tools
tls
ssl
handshake

TLS establishes a secure channel between client and server by negotiating a cipher suite, authenticating the server (and optionally the client), and deriving session keys. TLS 1.3 shortens the handshake to a single round trip.

TLS 1.3 handshake (1-RTT)

code
Client                          Server
  |--- ClientHello ----------->|
  |        (key share, suites)  |
  |<-- ServerHello, key share -|
  |<-- EncryptedExtensions,    -|
  |<-- Certificate, Finished --|
  |--- Finished -------------->|
  |<===== encrypted data =====>|
Table
StepPurpose
ClientHelloPropose versions, cipher suites, key share.
ServerHelloSelect version, cipher, key share.
CertificateServer proves identity.
FinishedVerify the handshake integrity.

TLS 1.2 vs 1.3

Table
AspectTLS 1.2TLS 1.3
Round trips21
Cipher suitesRSA + ECDHEECDHE only (forward secrecy).
RenegotiationSupportedRemoved.
Session resumptionSession IDs/ticketsPSK-based.

Certificate validation

Table
CheckPurpose
Chain of trustVerify issuer up to a trusted root.
Validity periodNot expired, not not-yet-valid.
Hostname matchSAN matches the requested host.
RevocationOCSP or CRL check.

Inspect with openssl

bash
openssl s_client -connect example.com:443 -servername example.com
openssl s_client -connect example.com:443 -tls1_2
openssl s_client -connect example.com:443 -tls1_3
openssl x509 -in cert.pem -text -noout

References