What mutual TLS exchanges in the handshake
One-way TLS authenticates the server only
In ordinary HTTPS the client verifies the server certificate. The server has no idea who the client is, and the application separates users with logins or tokens. Mutual TLS adds the other direction: the server asks the client for a certificate too.
So mTLS is not a replacement for login. It attaches identity to the connection itself. Only a program holding the matching private key can connect, which is why it is common for service-to-service calls, administrative APIs and device enrolment.
The order of the handshake
TLS 1.2 and 1.3 differ in message names and in when encryption starts, but the point where a client certificate is requested is the same. The server receives ClientHello, sends its own certificate and then asks the client for one.
- ClientHello — the client offers versions, cipher suites and extensions.
- ServerHello, Certificate — the server presents its own chain.
- CertificateRequest — the server names the CAs it trusts and the signature algorithms it accepts and asks for a client certificate (optional in TLS 1.2, skippable in 1.3).
- Certificate — the client sends its certificate and any intermediate CA. The root is normally omitted.
- CertificateVerify — the client signs the handshake transcript with its private key, proving possession. This is why copying a certificate is not enough.
- Finished — both sides exchange a handshake summary and the connection is up.
Without CertificateVerify a certificate is public information only. The trust in mutual TLS comes from proof of possession, not from the certificate itself.
Who verifies
The party accepting the connection verifies the client certificate. A plain server leaves it to the application framework; with a proxy in front, the proxy verifies. Once the proxy is done, the application usually receives three things in headers.
| Header | Nginx variable | Meaning |
|---|---|---|
| X-Client-Verify | $ssl_client_verify | SUCCESS, NONE or FAILED:reason |
| X-Client-DN | $ssl_client_s_dn | Subject DN of the client certificate |
| X-Client-Serial | $ssl_client_serial | Serial number of the client certificate |
The problem is that such a header is indistinguishable from one the client sent. Unless the proxy overwrites it, a client can send X-Client-DN itself and claim any identity. The proxy must overwrite with set and refuse failed requests itself.
How much of the chain is sent
The client sends its own certificate and its issuer, the intermediate CA, and normally omits the root because the server already has it in its trust store. Leaving out an intermediate breaks verification even when the names line up.
This page compares issuer to subject and AKI to SKI across the certificates you paste, names a missing issuer and verifies RSA signatures. ECDSA and Ed25519 are read structurally and marked unverified.
Questions
Does mutual TLS work in TLS 1.3?
Yes. The server still sends a CertificateRequest, and the client proves key possession with Certificate and CertificateVerify. In TLS 1.3 those certificate messages travel encrypted.
How does a client certificate differ from a server certificate?
The structure is identical; the purpose differs. A server certificate needs serverAuth and a host name in SAN; a client certificate needs clientAuth and a name that identifies the client, usually a DNS or URI SAN.
If a proxy terminates TLS, where is the client certificate verified?
At the point that terminates TLS. Nginx, Envoy or HAProxy verifies the client certificate and passes the result and subject to the application in headers. Trusting those headers without verification bypasses authentication.
Paste a chain and the page judges each certificate's role and EKU suitability.
Open the toolThis article follows RFC 5280 (X.509), RFC 8446 (TLS 1.3), RFC 5246 (TLS 1.2), RFC 6125 (host name verification), RFC 6960 (OCSP), the CRL distribution points of RFC 5280 4.2.1.13, the SPIFFE ID specification and the Nginx, Envoy and HAProxy documentation. Every example certificate is synthetic, made for this site, and uses only the reserved example.com and example.net domains.