You are reviewing the security posture of an internet-facing service that terminates TLS before forwarding requests to internal application servers. A recent incident review showed that several engineers could describe HTTPS at a high level but struggled to explain what the client actually verifies during connection setup and where confidentiality and authenticity come from. You need to show that you understand the protocol well enough to reason about misconfiguration, downgrade risk, and certificate trust.
Walk me through how HTTPS works during the handshake process step-by-step, from the moment a client connects to a server through establishment of encrypted application traffic. Be explicit about certificate validation, key agreement, what changes in TLS 1.3 versus older handshakes, and which attacks each step is meant to prevent.