Skip to content

Commit 31aa9f8

Browse files
rolandshoemakergopherbot
authored andcommitted
crypto/tls: use inner hello for earlyData when using QUIC and ECH
I don't think we have good QUIC ECH tests. BoGo has some for this, but I'm not sure how easy it would be to enable those for QUIC. Fixes #76283 Change-Id: I0ffa535fd89a624b7f9bfd73441ce2a1683e0549 Reviewed-on: https://go-review.googlesource.com/c/go/+/720920 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Roland Shoemaker <roland@golang.org> Reviewed-by: Damien Neil <dneil@google.com>
1 parent d68aec8 commit 31aa9f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/crypto/tls/handshake_client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ func (c *Conn) clientHandshake(ctx context.Context) (err error) {
308308
if hello.earlyData {
309309
suite := cipherSuiteTLS13ByID(session.cipherSuite)
310310
transcript := suite.hash.New()
311-
if err := transcriptMsg(hello, transcript); err != nil {
311+
transcriptHello := hello
312+
if ech != nil {
313+
transcriptHello = ech.innerHello
314+
}
315+
if err := transcriptMsg(transcriptHello, transcript); err != nil {
312316
return err
313317
}
314318
earlyTrafficSecret := earlySecret.ClientEarlyTrafficSecret(transcript)

0 commit comments

Comments
 (0)