]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: send illegal_parameter on invalid ECHClientHello.type
authorthekuwayama <thekuwayama@gmail.com>
Mon, 30 Dec 2024 19:28:35 +0000 (19:28 +0000)
committerRoland Shoemaker <roland@golang.org>
Tue, 7 Jan 2025 14:36:26 +0000 (06:36 -0800)
commit850b276a6765d20bf01c44d6126386e8fb7d8a76
tree724dd20b9e8373c9633be7d8ce387ec4d9a4628e
parent27c516437439c47c2479201191642bf7aaf5885b
crypto/tls: send illegal_parameter on invalid ECHClientHello.type

The spec indicates that if a client sends an invalid ECHClientHello.type
in ClientHelloOuter, the server will abort the handshake with a
decode_error alert.

Define errInvalidECHExt for invalid ECHClientHello.type. If parseECHExt
returns an errInvalidECHExt error, Conn now sends an illegal_parameter
alert.

Fixes #71061.

Change-Id: I240241fe8bbe3e77d6ad1af989794647bfa2ff87
GitHub-Last-Rev: 3d6c233ccd401453bfb1a4fc97fa5deeb5b2fbc8
GitHub-Pull-Request: golang/go#71062
Reviewed-on: https://go-review.googlesource.com/c/go/+/639235
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/crypto/tls/ech.go