maskit opened a new pull request, #14068:
URL: https://github.com/apache/trafficserver/pull/14068

   On OpenSSL builds, the ClientHello sent after a TLS 1.3 HelloRetryRequest 
reaches the early return in `ssl_client_hello_callback()` that PR 13799 added 
for callbacks retried after a paused ClientHello hook. That return skips the 
sni.yaml actions, so a second ClientHello naming a different server than the 
first kept the first name's actions (for example its `verify_client` level) 
while ATS recorded the new name as the connection's SNI. RFC 8446 section 4.1.2 
requires the second ClientHello to repeat the first apart from a few listed 
fields, and server_name is not one of them.
   
   ## Change
   
   - The early-return path now compares the ClientHello's server name with the 
one recorded for the first ClientHello, and rejects the handshake with an 
`illegal_parameter` alert if they differ (including a name added or dropped).
   - A retried callback after a paused hook sees the same ClientHello, so it 
still passes. TLS 1.2 renegotiation does not take this path and is unchanged.
   - The server_name parsing moves from `TLSSNISupport::on_client_hello()` into 
`TLSSNISupport::ClientHello::getServerName()` so both callers share it.
   
   BoringSSL is not affected: it calls `select_certificate_cb` only for the 
first ClientHello and negotiates from it alone.
   
   ## Testing
   
   - New Uranium test `test_tls_hrr_sni_change` forces a HelloRetryRequest and 
asserts it happened on every connection. A pyOpenSSL client changes the SNI 
between the two ClientHellos from its info callback. It covers the same name 
with and without a client certificate, and a name switched to a `verify_client: 
STRICT` name. On OpenSSL the switched handshake is rejected; on BoringSSL it 
completes under the first name and the request is refused by `host_sni_policy`.
   - With the new check disabled, the switched case is served without a client 
certificate and the test fails.
   - `test_tls_hooks_cert_resume`, `test_tls_renegotiation`, 
`test_tls_renegotiation_allowed` and the `test_tls_client_verify*` tests pass 
on OpenSSL 3 and BoringSSL.
   
   Only master and 10.2.x carry PR 13799; no release is affected.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to