Marten Seemann
41ca178dcc
don't run the handshake drop integration tests twice
2019-01-02 10:04:38 +07:00
Marten Seemann
8b2eb76b75
Merge pull request #1699 from lucas-clemente/fix-short-packet-cutting
...
fix length check for too short packets
2019-01-01 12:08:25 +07:00
Marten Seemann
99b1e50722
fix length check for too short packets
2019-01-01 11:37:09 +07:00
Marten Seemann
673ad95a44
Merge pull request #1698 from lucas-clemente/coalesced-packets
...
implement parsing of coalesced packets
2019-01-01 10:03:18 +07:00
Marten Seemann
b32fb438af
make putting back packet buffers a member function of packetBuffer
2019-01-01 09:50:35 +07:00
Marten Seemann
d3ea7c0c4c
implement handling of coalesced packets
2019-01-01 09:50:35 +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
767dbdd545
put back packet buffers after processing a packet
...
This introduces a reference counter in the packet buffer, which will be
used to process coalesced packets.
2019-01-01 09:50:29 +07:00
Marten Seemann
ed27d0d989
Merge pull request #1696 from lucas-clemente/use-iv-in-aead
...
use the IV when sealing and opening
2018-12-31 00:28:07 +07:00
Marten Seemann
413844d0bc
use in-place decryption when opening packets
2018-12-30 12:41:41 +07:00
Marten Seemann
e3d2c81729
simplify packing of packets
2018-12-30 12:41:30 +07:00
Marten Seemann
be4bdbfad9
remove the encryption level from the packed packet struct
...
This was only needed in gQUIC. In IETF QUIC, We can always derive the
encryption level from the header type when needed.
2018-12-30 12:37:04 +07:00
Marten Seemann
538b84b78d
use the IV when sealing and opening
2018-12-29 16:11:27 +07:00
Marten Seemann
eaad3b2bdf
Merge pull request #1690 from lucas-clemente/rename-handshake-packets
...
rename handshake packets to crypto packets
2018-12-29 08:22:30 +07:00
Marten Seemann
94d80a2271
Merge pull request #1694 from lucas-clemente/remove-go1.8-testcase
...
remove an old Go 1.8 test case
2018-12-29 07:50:50 +07:00
Marten Seemann
ae385e776c
remove an old Go 1.8 test case
2018-12-28 19:25:43 +07:00
Marten Seemann
cf7f2dc661
rename handshake packets to crypto packets
2018-12-28 13:17:31 +07:00
Marten Seemann
3d2d45d53f
Merge pull request #1687 from lucas-clemente/draft-17-initial
...
use the draft-17 initial encryption
2018-12-27 17:20:00 +07:00
Marten Seemann
7cb84c4e06
Merge pull request #1685 from lucas-clemente/increase-pn-after-vn-and-retry
...
increase the packet number after version negotiation and retry
2018-12-27 17:00:58 +07:00
Marten Seemann
b1592d0616
use the draft-17 initial encryption
2018-12-27 16:50:42 +07:00
Marten Seemann
90738b5e0e
Merge pull request #1686 from lucas-clemente/update-qtls
...
update qtls
2018-12-27 16:49:34 +07:00
Marten Seemann
4b194c6fcd
Merge pull request #1684 from lucas-clemente/accept-multiple-acks
...
accept multiple ACKs sent in the same packet
2018-12-27 16:47:38 +07:00
Marten Seemann
07030de6c2
update qtls
2018-12-25 21:35:06 +06:30
Marten Seemann
178ac0dacb
keep increasing the packet number after version negotiation and retry
2018-12-22 22:15:35 +06:30
Marten Seemann
1abf9e1b37
start with packet number 0
2018-12-22 21:25:14 +06:30
Marten Seemann
f9218444a9
use a separate function to close the session after VN and retry
2018-12-21 23:47:10 +06:30
Marten Seemann
a4128ed469
accept multiple ACKs sent in the same packet
2018-12-21 21:10:23 +06:30
Marten Seemann
b166757fd9
Merge pull request #1680 from lucas-clemente/stream-deadlock
...
fix a deadlock when setting read and write deadlines
2018-12-21 15:43:07 +06:30
Marten Seemann
57fb06d3a7
Merge pull request #1682 from lucas-clemente/undecryptable-packets
...
only queue packets for later decryption if the opener is not yet available
2018-12-20 16:35:26 +06:30
Marten Seemann
74d8a2bd7d
ignore 0-RTT packets
2018-12-20 15:25:04 +06:30
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
a8ad6eea38
add integration tests for setting read and write deadlines
2018-12-20 14:43:25 +06:30
Marten Seemann
0be8e033ab
fix race conditions when setting read and write deadlines
2018-12-20 14:43:11 +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
516b427d46
don't set a timer when the deadline is the zero value
2018-12-18 22:06:57 +06:30
Marten Seemann
072b84870c
don't fire a newly created timer
2018-12-18 22:06:57 +06:30
Marten Seemann
1045c7dc94
Merge pull request #1679 from lucas-clemente/fix-send-stream-deadlock
...
fix deadlock when sending stream data
2018-12-18 22:06:00 +06:30
Marten Seemann
01e37e005a
fix deadlock when closing and receiving MAX_STREAM_DATA frames
2018-12-18 20:55:31 +06:30
Marten Seemann
8761cee0ef
fix deadlock when sending stream data
2018-12-18 16:26:58 +06:30
Marten Seemann
dadb6d395c
Merge pull request #1676 from lucas-clemente/fix-1675
...
only copy stream data to write when popping a STREAM frame
2018-12-18 16:21:06 +06:30
Marten Seemann
21de8fde1e
Merge pull request #1678 from lucas-clemente/fix-double-framer-init
...
only initialize the framer once
2018-12-18 16:09:14 +06:30
Marten Seemann
d535340d0c
only initialize the framer once
2018-12-18 15:45:40 +06:30
Marten Seemann
466825eeb2
only copy stream data to write when popping a STREAM frame
...
stream.Write can be called with arbitrarily large slices of data. We
should avoid copying all that data up front since this can take a long
time. Instead, we can copy the data that is dequeued when a STREAM frame
is popped.
2018-12-18 14:35:48 +06:30
Marten Seemann
bd9baf928c
Merge pull request #1672 from lucas-clemente/header-encryption
...
implement header encryption
2018-12-16 18:32:50 +06:30
Marten Seemann
a638185f97
apply header encryption when packing and unpacking packets
2018-12-14 21:34:00 +06:30
Marten Seemann
5a68ba0a02
implement header encrytion and decryption for sealers and openers
2018-12-14 16:46:40 +06:30
Marten Seemann
67f923c736
return the Opener from the crypto setup
2018-12-14 16:46:40 +06:30
Marten Seemann
d3611a014c
implement initial header encryption key derivation
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