fix retry key and nonce for draft-34

This commit is contained in:
Marten Seemann
2021-03-03 23:01:42 +08:00
parent 2c45f2b11d
commit bd172b2a5a
7 changed files with 37 additions and 19 deletions

View File

@@ -970,7 +970,7 @@ func (s *session) handleRetryPacket(hdr *wire.Header, data []byte) bool /* was t
return false
}
tag := handshake.GetRetryIntegrityTag(data[:len(data)-16], destConnID)
tag := handshake.GetRetryIntegrityTag(data[:len(data)-16], destConnID, hdr.Version)
if !bytes.Equal(data[len(data)-16:], tag[:]) {
if s.tracer != nil {
s.tracer.DroppedPacket(logging.PacketTypeRetry, protocol.ByteCount(len(data)), logging.PacketDropPayloadDecryptError)