From: Marten Seemann Date: Thu, 25 May 2023 08:06:41 +0000 (+0300) Subject: crypto/tls: fix cipher suite check when doing 0-RTT resumption X-Git-Tag: go1.21rc1~190 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=30db6f202637251d57ee6c17ce666dacb0c59b46;p=gostls13.git crypto/tls: fix cipher suite check when doing 0-RTT resumption Change-Id: Ia50898308b80149f862457f9cd9f1123da4e6b6f Reviewed-on: https://go-review.googlesource.com/c/go/+/498215 Reviewed-by: Filippo Valsorda Reviewed-by: Macrombi Lux TryBot-Result: Gopher Robot Reviewed-by: Damien Neil Auto-Submit: Filippo Valsorda Reviewed-by: Michael Knyszek Run-TryBot: Filippo Valsorda --- diff --git a/src/crypto/tls/handshake_client.go b/src/crypto/tls/handshake_client.go index 44949c8a22..2ea74c5494 100644 --- a/src/crypto/tls/handshake_client.go +++ b/src/crypto/tls/handshake_client.go @@ -376,7 +376,7 @@ func (c *Conn) loadSession(hello *clientHelloMsg) ( if c.quic != nil && session.EarlyData { // For 0-RTT, the cipher suite has to match exactly, and we need to be // offering the same ALPN. - if mutualCipherSuite(hello.cipherSuites, session.cipherSuite) != nil { + if mutualCipherSuiteTLS13(hello.cipherSuites, session.cipherSuite) != nil { for _, alpn := range hello.alpnProtocols { if alpn == session.alpnProtocol { hello.earlyData = true