don't queue a packet for later decryption of decryption already failed

This was an optimization in gQUIC, which relied on trial decryption. In
IETF QUIC, we know with certainty which keys were used to encrypt a
packet, so if decryption fails once, we are certain it will never
succeed.
This commit is contained in:
Marten Seemann 2018-12-19 15:56:01 +06:30
parent 1045c7dc94
commit 605846cfd8
2 changed files with 2 additions and 2 deletions

View file

@ -147,7 +147,7 @@ var _ = Describe("Packet Unpacker", func() {
opener.EXPECT().DecryptHeader(gomock.Any(), gomock.Any(), gomock.Any())
opener.EXPECT().Open(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, errors.New("test err"))
_, err := unpacker.Unpack(hdr, hdrRaw)
Expect(err).To(MatchError(qerr.Error(qerr.DecryptionFailure, "test err")))
Expect(err).To(MatchError("test err"))
})
It("decrypts the header", func() {