mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-03 20:27:35 +03:00
introduce a dedicated qerr.TransportError and qerr.ApplicationError
This commit is contained in:
parent
ddeb2281fc
commit
592fb9cad9
57 changed files with 845 additions and 521 deletions
|
@ -186,9 +186,10 @@ var _ = Describe("Packet Unpacker", func() {
|
|||
cs.EXPECT().GetHandshakeOpener().Return(opener, nil)
|
||||
opener.EXPECT().DecryptHeader(gomock.Any(), gomock.Any(), gomock.Any())
|
||||
opener.EXPECT().DecodePacketNumber(gomock.Any(), gomock.Any())
|
||||
opener.EXPECT().Open(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, qerr.CryptoBufferExceeded)
|
||||
unpackErr := &qerr.TransportError{ErrorCode: qerr.CryptoBufferExceeded}
|
||||
opener.EXPECT().Open(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, unpackErr)
|
||||
_, err := unpacker.Unpack(hdr, time.Now(), append(hdrRaw, payload...))
|
||||
Expect(err).To(MatchError(qerr.CryptoBufferExceeded))
|
||||
Expect(err).To(MatchError(unpackErr))
|
||||
})
|
||||
|
||||
It("defends against the timing side-channel when the reserved bits are wrong, for long header packets", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue