count diversification nonce in public header length

fixes #161
This commit is contained in:
Lucas Clemente
2016-06-02 12:40:14 +02:00
parent 252e884076
commit 1896003f42
2 changed files with 11 additions and 0 deletions

View File

@@ -175,6 +175,7 @@ func (h *publicHeader) GetLength() (protocol.ByteCount, error) {
if !h.TruncateConnectionID {
length += 8 // 8 bytes for the connection ID
}
length += protocol.ByteCount(len(h.DiversificationNonce))
length += protocol.ByteCount(h.PacketNumberLen)
return length, nil
}