+24
−11
+9
−2
Loading
Server-side TLS 1.2 never completed a usable handshake:
- The ClientHello was only added to handshake_transcript on the TLS 1.3
path, so the TLS 1.2 transcript started at ServerHello. With EMS the
master secret came out wrong ("GCM tag verification failed" on the
client Finished), without EMS the Finished check failed ("client
Finished verify_data mismatch").
- The PRF and the handshake hash were always SHA-256. The *_SHA384 GCM
suites (0xC02C, 0xC030) need SHA-384 for both (RFC 5289), and 0xC030
is what the server prefers. This also broke the client against
servers that pick ECDHE_ECDSA_AES_256_GCM_SHA384.
prf() is now a member that picks HMAC-SHA256/384 from chosenSuite, and
the TLS 1.2 transcript hashes go through tls12Hash().
Checked with openssl s_client/s_server: ECDHE-RSA-AES{128,256}-GCM,
AES{128,256}-SHA with and without EMS (server), ECDHE-ECDSA-AES{128,256}-GCM
(client), TLS 1.3 both ways.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>