]> Cypherpunks.ru repositories - gostls13.git/commit
crypto/tls: fix PSK binder calculation
authorTero Saarni <tero.saarni@gmail.com>
Wed, 12 Apr 2023 10:07:07 +0000 (10:07 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 24 Apr 2023 13:35:52 +0000 (13:35 +0000)
commit2c70690451f1484607a9172a4c24f78ae832dcb0
tree4347a020a34ee5f47bd615515892f3950dbec364
parent6bbbc5dc70e9e5698818d5c47b6536e72619884b
crypto/tls: fix PSK binder calculation

When server and client have mismatch in curve preference, the server will
send HelloRetryRequest during TLSv1.3 PSK resumption. There was a bug
introduced by Go1.19.6 or later and Go1.20.1 or later, that makes the client
calculate the PSK binder hash incorrectly. Server will reject the TLS
handshake by sending alert: invalid PSK binder.

Fixes #59424

Change-Id: I2ca8948474275740a36d991c057b62a13392dbb9
GitHub-Last-Rev: 1aad9bcf27f563449c1a7ed6d0dd1d247cc65713
GitHub-Pull-Request: golang/go#59425
Reviewed-on: https://go-review.googlesource.com/c/go/+/481955
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
src/crypto/tls/handshake_client_test.go
src/crypto/tls/handshake_client_tls13.go