mirror of
https://github.com/XTLS/REALITY.git
synced 2025-08-22 14:38:35 +00:00
crypto/tls: reject change_cipher_spec record after handshake in TLS 1.3
https://github.com/golang/go/pull/58912
This commit is contained in:
parent
6f8fa90c03
commit
15efa424b2
2
conn.go
2
conn.go
@ -762,7 +762,7 @@ func (c *Conn) readRecordOrCCS(expectChangeCipherSpec bool) error {
|
|||||||
// 5, a server can send a ChangeCipherSpec before its ServerHello, when
|
// 5, a server can send a ChangeCipherSpec before its ServerHello, when
|
||||||
// c.vers is still unset. That's not useful though and suspicious if the
|
// c.vers is still unset. That's not useful though and suspicious if the
|
||||||
// server then selects a lower protocol version, so don't allow that.
|
// server then selects a lower protocol version, so don't allow that.
|
||||||
if c.vers == VersionTLS13 {
|
if c.vers == VersionTLS13 && !handshakeComplete {
|
||||||
return c.retryReadRecord(expectChangeCipherSpec)
|
return c.retryReadRecord(expectChangeCipherSpec)
|
||||||
}
|
}
|
||||||
if !expectChangeCipherSpec {
|
if !expectChangeCipherSpec {
|
||||||
|
Loading…
Reference in New Issue
Block a user