← Caesium

Large resumed ClientHello (PXY-7002)

Before the PXY-7002 fix, tungsten read the client's TLS ClientHello into a 4096-byte buffer. A CONNECT tunnel whose ClientHello record was larger got a 200 and then a closed socket. In production the large hellos come from resumed mutual-TLS sessions: the server puts the client certificate in the session ticket, and the browser sends the ticket back in every later ClientHello. The first visit works (a full handshake has a small hello); every resumed connection fails.

This page reproduces that. The caesium [mtls] listener asks for a client certificate and resumes sessions with tickets that carry the certificate. Install one of the test certificates below; its size sets the size of the resumed ClientHello. Then run the probes: each one is a new connection (Connection: close), so after the first one the browser resumes with the large ticket.

1. Requirements

2. Install a test client certificate

PKCS#12 password: caesium. The .pem files hold the certificate and the key for curl or openssl. These are throw-away test identities; the listener accepts any client certificate.

ProfileCertificate sizeDownloadExpected result through tungsten
small454 bytessmall.p12 · small.pemControl. The resumed hello stays under 4096 bytes, so every tungsten version passes it.
medium6002 bytesmedium.p12 · medium.pemThe PXY-7002 case (about 8 KB). Tungsten without the fix drops the resumed connections; tungsten with the fix passes them.
large13003 byteslarge.p12 · large.pemNear the 16,384-byte single-record limit. Tungsten with the fix passes it.
split18003 bytessplit.p12 · split.pemAbove 16,384 bytes: the browser splits the hello across TLS records. Tungsten does not support that and closes the connection, even with the PXY-7002 fix.

The resumed ClientHello is about the certificate size plus 2 KB (the browser's normal hello and the ticket overhead). The probe table shows the exact size.

Chrome or Edge on Windows
  1. Open the downloaded .p12 file. The Certificate Import Wizard starts.
  2. Store location: Current User. Next.
  3. Enter the password caesium. Next.
  4. Select Automatically select the certificate store. Next, Finish.
Chrome, Edge or Safari on macOS
  1. Open the downloaded .p12 file. Keychain Access opens.
  2. Select the login keychain and enter the password caesium.
Chrome on Linux
  1. Open chrome://certificate-manager, go to your client certificates, and choose Import. Select the .p12 file and enter the password caesium.
  2. Or, in a terminal: pk12util -d sql:$HOME/.pki/nssdb -i caesium-pxy7002-medium.p12 -W caesium
Firefox (all systems)
  1. Settings → Privacy & Security → Certificates → View Certificates…
  2. Your Certificates tab → Import… → select the .p12 file → password caesium.

On the first probe the browser asks which certificate to send. Choose caesium PXY-7002 test client (…) (in Firefox, also tick Remember this decision).

Switching profiles: the browser keeps the chosen certificate and the session ticket for the host until it restarts. Restart the browser (in Chrome: chrome://restart) before you try another profile. Removing: delete the caesium PXY-7002 test client entries in the same certificate manager (macOS: search for caesium in Keychain Access).

3. Run the probes

Directly to caesium (no proxy) every probe passes; use that as the baseline. Through tungsten, the first probe is normally a full handshake and the rest resume. A browser that still holds a ticket from an earlier run resumes on the first probe too.

This page's connection

As caesium saw the connection that loaded this page. Only the [mtls] listener requests certificates and resumes sessions.

{
  "mtls_listener": false,
  "tls_version": "TLS 1.3",
  "resumed": false,
  "client_cert": null,
  "client_hello": {
    "record_len": 261,
    "message_len": 261,
    "spans_records": false
  }
}