Skip to content

Commit 53b65fd

Browse files
FiloSottilewwqgtxx
authored andcommitted
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>
1 parent 1d6c4ff commit 53b65fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handshake_messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,7 @@ func (m *certificateRequestMsg) unmarshal(data []byte) bool {
18471847
}
18481848
sigAndHashLen := uint16(data[0])<<8 | uint16(data[1])
18491849
data = data[2:]
1850-
if sigAndHashLen&1 != 0 {
1850+
if sigAndHashLen&1 != 0 || sigAndHashLen == 0 {
18511851
return false
18521852
}
18531853
if len(data) < int(sigAndHashLen) {

0 commit comments

Comments
 (0)