Gaukas Wang
856bc02b8f
Merge branch 'upstream' into sync-upstream
2023-08-28 14:12:03 -06:00
Marten Seemann
2797f85fc0
switch from unmaintained golang/mock to go.uber.org/mock ( #4050 )
2023-08-28 02:23:55 -07:00
Gaukas Wang
95575f5fe7
break: update repo url [ci skip]
...
uTLS is not yet bumped to the new version, so this commit breaks the dependencies relationship by getting rid of the local replace.
2023-08-03 18:58:52 -06:00
Marten Seemann
58cedf7a4f
rename module, adjust import paths to quic-go/quic-go ( #3680 )
2023-01-21 19:53:57 -08:00
Marten Seemann
56985cbfd1
refactor the packet unpacker to remove version param from constructor
2023-01-18 20:53:45 +13:00
Marten Seemann
c24fbb094c
refactor header writing to append to a byte slice ( #3646 )
...
This avoids having to allocate a bytes.Buffer.
2023-01-17 01:56:06 -08:00
Marten Seemann
86edf7fd4b
remove the LongHeader field from the wire.Header
2023-01-17 21:53:39 +13:00
Marten Seemann
e89fc1152b
stop using the ExtendedHeader for writing short header packets in tests
2023-01-17 21:53:39 +13:00
Marten Seemann
870fbe7ab0
migrate to Ginkgo v2
2022-10-11 16:38:44 +04:00
Marten Seemann
656f3d2d7d
remove the wire.ShortHeader in favor of more return values ( #3535 )
2022-08-30 04:37:36 -07:00
Marten Seemann
4f3d3b36ac
introduce a separate code path for unpacking short header packets
2022-08-29 15:55:37 +03:00
Marten Seemann
e3723a0ef1
move the check for empty payload to the unpacker
2022-08-29 13:11:58 +03:00
Marten Seemann
fd1b3a23c4
remove unneeded packet number field from the unpackedPacket
2022-08-29 13:11:57 +03:00
Marten Seemann
1aced95d41
use an array instead of a byte slice for Connection IDs
2022-08-29 11:30:31 +03:00
Marten Seemann
dbb517858e
fix incorrect usage of errors.Is
...
errors.Is is supposed to used for equality of errors, not for type
assertions. That's what errors.As is there for.
2021-06-28 15:29:52 -07:00
Marten Seemann
592fb9cad9
introduce a dedicated qerr.TransportError and qerr.ApplicationError
2021-05-01 09:38:48 +07:00
Marten Seemann
95334202c5
fix decoding of packet numbers in different packet number spaces
...
When QUIC abandoned the "stream 0" design, it introduced separate
packet number spaces for packets with different encryption levels.
Packet number compression now also works per packet number space.
The current code doesn't lead to any problems if the peer starts sending
with packet number 0, as we only exchange a few packets in the Initial
and the Handshake packet number space and there's nothing to compress.
It might lead to problems if the peer starts with a large packet number
in one space (which is allowed by the spec), and then starts with a
small packet number in another packet number space.
2020-12-03 23:35:27 +07:00
Marten Seemann
a528c4c4da
close session on errors unpacking errors other than decryption errors
2020-09-09 23:59:24 +07:00
Marten Seemann
fc37cdc5c5
implement unpacking of 0-RTT packets
2019-12-30 18:39:21 +04:00
Marten Seemann
3db60534cf
use a sentinel error when a sealer is not yet available
2019-11-12 11:27:30 +07:00
Marten Seemann
bb48c9b31a
pass the time a packet was received to the short header opener
...
This saves us one time.Now() syscall per received 1-RTT packet.
2019-08-11 13:33:02 +07:00
Marten Seemann
7b9b711a77
fix timing side channel when reading headers with invalid reserved bits
2019-06-30 15:57:03 +07:00
Marten Seemann
598628d05b
use separate opener interfaces for long and short header packets
2019-06-22 20:01:18 +08:00
Marten Seemann
d4d3f09ee3
use separate functions per encryption level to get openers
2019-06-22 20:01:18 +08:00
Marten Seemann
28ed85b9c6
move cutting of coalesced packets to the wire package
2019-02-23 10:24:42 +08:00
Marten Seemann
855b643c7c
move frame parsing to the session
...
This way, we can handle every parsed frame directly, and avoid
allocating a slice of parsed frames.
2019-01-03 18:53:36 +07:00
Marten Seemann
ba45256b32
check that the packet is large enough for the header encryption sample
2019-01-01 13:06:02 +07:00
Marten Seemann
6ce7a204fc
move cutting of packets with a length to the packet handler map
2019-01-01 09:50:35 +07:00
Marten Seemann
d6c304610d
only queue packets for decryption if the opener is not yet available
2018-12-20 15:24:56 +06:30
Marten Seemann
605846cfd8
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.
2018-12-19 15:56:01 +06:30
Marten Seemann
a638185f97
apply header encryption when packing and unpacking packets
2018-12-14 21:34:00 +06:30
Marten Seemann
67f923c736
return the Opener from the crypto setup
2018-12-14 16:46:40 +06:30
Marten Seemann
03489f56a7
handle the packet length before parsing the extended header
2018-12-14 16:46:40 +06:30
Marten Seemann
aaea375fb6
move parsing of the extended header to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
c912860a94
don't explicitely pass the header binary to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
ce6b9f2f1d
save the decoded packet number on the unpacked packet
2018-12-14 16:46:40 +06:30
Marten Seemann
a8e5309cd1
move packet number decoding to the unpacker
2018-12-14 16:46:40 +06:30
Marten Seemann
bf96707f48
rename the wire.Header to ExtendedHeader
...
It's not encrypted yet.
2018-11-26 15:57:54 +07:00
Marten Seemann
c37b698f68
Merge pull request #1596 from lucas-clemente/internalize-errors
...
internalize the qerr package
2018-11-12 15:54:39 +07:00
Marten Seemann
3ffea5d8c4
internalize the qerr package
2018-11-11 12:44:16 +07:00
Marten Seemann
387613aa20
rename the BLOCKED from to DATA_BLOCKED
2018-11-10 09:05:06 +07:00
Marten Seemann
3266e36811
drop support for gQUIC
2018-10-30 10:20:39 +07:00
Marten Seemann
82508f1562
use tls-tris instead of mint
2018-10-26 16:18:49 +07:00
Marten Seemann
302d2a1715
don't use trial decryption for IETF QUIC
2018-03-31 14:29:44 +07:00
Marten Seemann
2fbc994d29
move the unencrypted STREAM frame check from the unpacker to the session
2018-03-31 14:29:44 +07:00
Marten Seemann
21b608daac
move frame parsing to the wire package
2018-03-25 18:07:44 +02:00
Marten Seemann
de4157f9ad
implement parsing and writing of STREAM_ID_BLOCKED frames
2018-01-04 17:02:14 +07:00
Marten Seemann
5afe35328a
implement parsing and writing of MAX_STREAM_ID frames
2018-01-04 17:02:10 +07:00
Marten Seemann
40650d93f0
add an application-defined error type, for RST_STREAM and STOP_SENDING
2017-12-15 16:21:09 +07:00
Marten Seemann
69998c19cb
add the offset field to the BLOCKED and STREAM_BLOCKED frames
...
The value is not yet set, but parsing and writing works.
2017-12-14 19:00:06 +07:00