mirror of
https://github.com/XTLS/REALITY.git
synced 2025-08-22 22:48:36 +00:00
crypto/tls: signature_algorithms in CertificateRequest can't be empty
Change-Id: I6a6a4656ab97e1f247df35b2589cd73461b4ac76 Reviewed-on: https://go-review.googlesource.com/c/go/+/675917 Auto-Submit: Filippo Valsorda <filippo@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
93949685ac
commit
aa3b80bc9c
@ -1790,7 +1790,7 @@ func (m *certificateRequestMsg) unmarshal(data []byte) bool {
|
|||||||
}
|
}
|
||||||
sigAndHashLen := uint16(data[0])<<8 | uint16(data[1])
|
sigAndHashLen := uint16(data[0])<<8 | uint16(data[1])
|
||||||
data = data[2:]
|
data = data[2:]
|
||||||
if sigAndHashLen&1 != 0 {
|
if sigAndHashLen&1 != 0 || sigAndHashLen == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if len(data) < int(sigAndHashLen) {
|
if len(data) < int(sigAndHashLen) {
|
||||||
|
Loading…
Reference in New Issue
Block a user