]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: fix ECH compatibility
author古大羊 <lj1788@gmail.com>
Mon, 10 Feb 2025 04:49:15 +0000 (12:49 +0800)
committerSean Liao <sean@liao.dev>
Mon, 17 Mar 2025 21:34:46 +0000 (14:34 -0700)
commitcd2f347c61bd9f41e977d74dc2dd3a1f36b65800
tree12dd782c50393775ea172b1d1c6f24f8a2b39cad
parentc7ea87132f4e6f3c81e525c396a64471c9af0091
crypto/tls: fix ECH compatibility

Previously, the code only checked supportedVersions[0] for TLS 1.3
However, Chromium-based
browsers may list TLS 1.3 at different positions, causing ECH failures.
This fix:
    Iterates through supportedVersions to accept connections as long as TLS 1.3 is present.
    Improves ECH compatibility, ensuring Chrome, Edge, and other browsers work properly.

Fixes #71642

Change-Id: I32f4219fb6654d5cc22c7f33497c6142c0acb4f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/648015
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
src/crypto/tls/ech.go