What actually happens in a TLS 1.3 handshake
TLS 1.3 folded the handshake into a single round trip. That is the headline, and it hides the interesting part: before the client has sent anything it can be sure of, it has already guessed which key agreement group the server will accept, and the server has to commit to a key share in its first flight.
The client sends a ClientHello with:
supported_versions TLS 1.3
key_share x25519 public key
signature_algorithms ed25519, ecdsa_secp256r1, rsa_pss
server_name the name it believes it is talking to
alpn h2, http/1.1
The server replies with its own key share, a certificate, and a signature over the transcript. Both sides derive the same three secrets — handshake, application, and exporter — from an HKDF over the shared x25519 result. Nothing above the transcript is encrypted until the handshake secrets exist; after that, the client's certificate and everything else travels under the application keys.
Where the certificate fits
The signature proves the server holds the private key for the certificate's public key. It does not prove the certificate belongs to the name in the server_name extension — that check is the client's job, and it is the one that actually protects you. A valid chain for some domain is worthless if that domain is not the one you asked for.
Encryption without name validation is a private channel to whoever answered the phone.
This is why openssl s_client -connect host:443 -servername name is still the fastest sanity check in the toolbox: if you omit -servername, you get the default virtual host's certificate and a misleading picture of a server that is usually configured correctly.
One more thing worth remembering: session resumption in 1.3 is PSK-based, and the ticket the client stores is opaque. If you rotate certificates but not tickets, a returning client can complete the handshake without ever seeing the new certificate. That is fine in normal operation and confusing when you are debugging a rollover.