crypto/tls: disallow handshake messages fragmented across CCS
BoGo: FragmentAcrossChangeCipherSpec-Server-Packed
This commit is contained in:
父節點
4191962f25
當前提交
de613b152d
5
conn.go
5
conn.go
@ -776,6 +776,11 @@ func (c *Conn) readRecord(want recordType) error {
|
||||
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
|
||||
break
|
||||
}
|
||||
// Handshake messages are not allowed to fragment across the CCS
|
||||
if c.hand.Len() > 0 {
|
||||
c.in.setErrorLocked(c.sendAlert(alertUnexpectedMessage))
|
||||
break
|
||||
}
|
||||
err := c.in.changeCipherSpec()
|
||||
if err != nil {
|
||||
c.in.setErrorLocked(c.sendAlert(err.(alert)))
|
||||
|
載入中…
新增問題並參考
Block a user