From 1192d2574f68c8a23f9c5ec3c894b04bf5e90ddf Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 29 Sep 2017 17:00:46 +0100 Subject: [PATCH] crypto/tls: fix SCT decoding Fixes: ("crypto/tls: add SignedCertificateTimestamps and OCSPStaple to 1.3") Fixes: ("crypto/tls: fix SCT extension wire format") --- handshake_messages.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handshake_messages.go b/handshake_messages.go index b1a3f36..5953ccb 100644 --- a/handshake_messages.go +++ b/handshake_messages.go @@ -1591,7 +1591,7 @@ func (m *certificateMsg13) unmarshal(data []byte) alert { if len(body) < 2 { return alertDecodeError } - listLen := int(body[0]<<8) | int(body[1]) + listLen := int(body[0])<<8 | int(body[1]) body = body[2:] if len(body) != listLen { return alertDecodeError @@ -1600,7 +1600,7 @@ func (m *certificateMsg13) unmarshal(data []byte) alert { if len(body) < 2 { return alertDecodeError } - sctLen := int(body[0]<<8) | int(body[1]) + sctLen := int(body[0])<<8 | int(body[1]) if len(body) < 2+sctLen { return alertDecodeError }