crypto/tls: fix SCT decoding
Fixes: ("crypto/tls: add SignedCertificateTimestamps and OCSPStaple to 1.3") Fixes: ("crypto/tls: fix SCT extension wire format")
Dieser Commit ist enthalten in:
Ursprung
d16cde640d
Commit
1192d2574f
@ -1591,7 +1591,7 @@ func (m *certificateMsg13) unmarshal(data []byte) alert {
|
|||||||
if len(body) < 2 {
|
if len(body) < 2 {
|
||||||
return alertDecodeError
|
return alertDecodeError
|
||||||
}
|
}
|
||||||
listLen := int(body[0]<<8) | int(body[1])
|
listLen := int(body[0])<<8 | int(body[1])
|
||||||
body = body[2:]
|
body = body[2:]
|
||||||
if len(body) != listLen {
|
if len(body) != listLen {
|
||||||
return alertDecodeError
|
return alertDecodeError
|
||||||
@ -1600,7 +1600,7 @@ func (m *certificateMsg13) unmarshal(data []byte) alert {
|
|||||||
if len(body) < 2 {
|
if len(body) < 2 {
|
||||||
return alertDecodeError
|
return alertDecodeError
|
||||||
}
|
}
|
||||||
sctLen := int(body[0]<<8) | int(body[1])
|
sctLen := int(body[0])<<8 | int(body[1])
|
||||||
if len(body) < 2+sctLen {
|
if len(body) < 2+sctLen {
|
||||||
return alertDecodeError
|
return alertDecodeError
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren