diff --git a/u_handshake_client.go b/u_handshake_client.go index 8f198113..a848124f 100644 --- a/u_handshake_client.go +++ b/u_handshake_client.go @@ -100,7 +100,7 @@ func (hs *clientHandshakeStateTLS13) decompressCert(m utlsCompressedCertificateM rawMsg[2] = uint8(m.uncompressedLength >> 8) rawMsg[3] = uint8(m.uncompressedLength) - n, err := decompressed.Read(rawMsg[4:]) + n, err := io.ReadFull(decompressed, rawMsg[4:]) if err != nil && !errors.Is(err, io.EOF) { c.sendAlert(alertBadCertificate) return nil, err