The green light that arrived one message too early

Somewhere in a monitoring stack sits a boolean called handshake_authenticated, and for a few hundred milliseconds it was the most confident liar in the building. The certificate chain matched the service policy. The server's CertificateVerify signature validated. The dashboard went green.

One record later, the client killed the connection.

That record was Finished. Its verify_data did not match the transcript and key the client had derived, so RFC 9846 required the client to terminate with decrypt_error. The client obeyed. No ordinary protected conversation ever started.

Nothing was wrong with the certificate. Nothing was wrong with the signature. The error was arithmetic in the observability layer: the authentication block had been closed one message too early, and proof that a peer holds a private key had been promoted into proof that both peers agree on the same handshake — a claim nobody had actually tested.

TLS 1.3 Finished vs CertificateVerify: two proofs, two keys, two questions

The two messages sit next to each other on the wire, which is precisely why they get confused. They answer different questions.

CertificateVerify covers a domain-separated construction containing the transcript hash through the Certificate message. Its signature proves the sender controls the private key behind the credential it presented. That is all it proves. Certificate-path and service-identity checks are separate work: a mathematically flawless signature can still belong to a certificate that policy rejects.

Finished is not a second certificate signature. TLS 1.3 derives a finished_key from the sender's handshake traffic secret, then computes an HMAC over the transcript hash through CertificateVerify when that message is present. A valid result confirms knowledge of the live handshake key material and agreement on the authenticated history at that boundary.

The split is easiest to see in PSK mode. A resumed or externally provisioned PSK handshake can omit Certificate and CertificateVerify entirely, and both parties still send Finished. Run it the other way and the asymmetry bites: a valid CertificateVerify followed by an invalid Finished is a failed handshake, not a mostly successful one with a blemish.

The transcript is a protocol object, not a packet-shaped memory

The transcript hash covers handshake messages in order, including each message's type and length header. It does not hash TLS record headers, alerts, or arbitrary application records. Records may fragment or coalesce handshake messages without changing the logical transcript.

HelloRetryRequest adds the trap: the first ClientHello is represented by a synthetic message_hash before the retry sequence continues. Which is why a packet collector cannot safely rebuild the Finished input by concatenating visible record payloads. It has to implement the protocol's transcript rules and, for encrypted TLS 1.3 messages, hold endpoint-derived diagnostic secrets or equivalent implementation evidence.

The negotiated cipher suite picks the hash used by both the transcript and HKDF. In TLS 1.3 the Finished verify_data length equals that hash's output length. Import the old TLS 1.2 assumption of a fixed 12 bytes and you have manufactured another plausible, wrong control.

Completion has a direction

Each endpoint derives separate client and server handshake traffic secrets, so each side builds its own Finished value and verifies the peer's at a different moment.

After the server sends its Finished it flips its sending side to application traffic keys and may transmit application data before the client's Finished ever arrives. The standard is blunt about what the server does not yet know: the client's identity, or even that the client is alive, because the ClientHello could have been replayed.

The client's position is different. It verifies the server Finished, sends any required client Certificate and CertificateVerify, then sends its own Finished. A single field called tls_complete erases all of that — which endpoint sent what, which peer value was verified, whether client authentication was still pending.

The narrow shared invariant is better: per direction, record finished_sent, peer_finished_verified, and the implementation state that made ordinary application data eligible. Let the application decide which combination is sufficient for a given action.

0-RTT is an explicit exception, not evidence of completion

TLS 1.3 lets a client fire 0-RTT data before it has seen the server Finished. That traffic is deliberately weaker: it is tied to a PSK from an earlier session and may be replayed. Its presence proves neither that the server accepted it nor that the current handshake later finished at all.

Operational records therefore need at least three states: early data offered, accepted or rejected; server Finished verified; ordinary post-handshake traffic established. Collapse them into "encrypted request received" and a replayable request inherits the authority of a completed fresh handshake.

EAP-TLS is the useful integration lesson. A surrounding protocol may define its own connected or tunnel-ready state around the TLS handshake, and the outer state is not allowed to move earlier just because one inner authentication message looked convincing.

A proxy is two cryptographic histories in one trench coat

At a TLS terminator, the downstream client and the proxy share one transcript and one pair of Finished values. The proxy and the origin share another. Even when both legs speak TLS 1.3, their randoms, negotiated parameters, secrets, credentials and completion times all differ.

Copying peer_finished_verified=true from the edge connection onto the upstream request invents continuity that does not exist. The upstream leg must establish its own evidence, and the proxy must add a separately authenticated application correlation if the origin is to learn anything about downstream identity.

Same rule for retries and connection pools. A request moved to a second upstream connection cannot inherit the first connection's Finished state. Correlation may explain the move; it cannot merge cryptographic histories.

Runtime APIs are witnesses with limited vocabularies

OpenSSL's SSL_is_init_finished() reports whether its state machine has reached the point where fully protected application data can move. The documentation also warns that early-data states do not fit a tidy before/in-init/finished partition. SSL_get_verify_result() reports certificate verification — not Finished verification, not application authorization.

Key-log callbacks can support controlled decryption and transcript reconstruction, but what falls out is sensitive key material. Switch them on across production just to prettify a dashboard and you have opened a new authority leak. The safer default: retain state transitions, negotiated identifiers, error classes and bounded trace correlation, and reserve raw secrets for isolated conformance tests.

Implementation names are not portable proof. BoringSSL's current headers document that its Finished accessors return zero for TLS 1.3. GnuTLS exposes handshake hooks and a dedicated Finished-packet error, while warning that input observed before handshake completion cannot yet be treated as protected from an active intermediary. Define a control by the protocol state it needs, then map and test it separately per library.

The evidence ledger: record the failure, not just the success

A reviewable connection record should preserve endpoint role, direction, negotiated version, cipher suite, transcript hash, authentication mode, certificate-policy result, CertificateVerify result, server Finished state, client Finished state, early-data disposition and TLS termination leg.

It should also preserve failure. A decrypt_error that follows a valid CertificateVerify is not noise to be folded into "certificate success". It is the evidence that the later boundary rejected the handshake.

The strongest conformance test changes one thing at a time. Mutate a single transcript byte, or a single Finished byte, and demand terminal failure. Keep the certificate and signature valid while corrupting Finished. Withhold the client Finished after accepting the server's. Exercise a PSK handshake with no certificate messages at all. Force HelloRetryRequest. Repeat through a proxy whose upstream parameters differ.

Those tests prove the running implementation respects the boundary. An RFC citation, an API symbol or a configured callback proves only that a rule or a capability exists.

Which is the whole lesson of the green dashboard: a certificate signature is a fact about a key, not a verdict about a conversation. The handshake ends when both directions say so — and not one record sooner.