Let's use constant instead of hardcoding values (same is done in bssl)
这个提交包含在:
父节点
91a6fcebab
当前提交
ad86d61c42
4
conn.go
4
conn.go
@ -365,8 +365,8 @@ func (hc *halfConn) decrypt(b *block) (ok bool, prefixLen int, alertValue alert)
|
||||
}
|
||||
// Check AD header, see 5.2 of RFC8446
|
||||
additionalData = make([]byte, 5)
|
||||
additionalData[0] = 23
|
||||
binary.BigEndian.PutUint16(additionalData[1:], 0x0303)
|
||||
additionalData[0] = byte(recordTypeApplicationData)
|
||||
binary.BigEndian.PutUint16(additionalData[1:], VersionTLS12)
|
||||
binary.BigEndian.PutUint16(additionalData[3:], uint16(len(payload)))
|
||||
}
|
||||
var err error
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户