delete handshake packets from history when receiving a forward-secure packet

This commit is contained in:
Marten Seemann
2018-02-23 19:08:53 +08:00
parent ecad36a65b
commit 8fd7219bfc
2 changed files with 19 additions and 3 deletions

View File

@@ -101,6 +101,13 @@ func (h *sentPacketHandler) SetHandshakeComplete() {
queue = append(queue, packet)
}
}
for el := h.packetHistory.Front(); el != nil; {
next := el.Next()
if el.Value.EncryptionLevel != protocol.EncryptionForwardSecure {
h.packetHistory.Remove(el)
}
el = next
}
h.retransmissionQueue = queue
h.handshakeComplete = true
}