浏览代码

crypto/tls: disallow handshake messages fragmented across CCS

Detected by BoGo test FragmentAcrossChangeCipherSpec-Server-Packed.

Change-Id: I9a76697b9cdeb010642766041971de5c7e533481
Reviewed-on: https://go-review.googlesource.com/48811
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
v1.2.3
Filippo Valsorda 7 年前
committed by Adam Langley
父节点
当前提交
d6b90c312b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      conn.go

+ 5
- 0
conn.go 查看文件

@@ -686,6 +686,11 @@ Again:
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)))


正在加载...
取消
保存