Marten Seemann
095c29dc2c
drop support for QUIC 37 and 38
2017-11-07 00:23:53 +07:00
Marten Seemann
9f1eb62860
implement the IETF draft BLOCKED and STREAM_BLOCKED frames
2017-11-04 15:22:14 +07:00
Marten Seemann
0f1f1c8d41
implement the MAX_DATA and MAX_STREAM_DATA frames
...
For gQUIC WINDOW_UPDATEs are converted to MAX_DATA and MAX_STREAM_DATA,
respectively.
2017-11-04 15:22:14 +07:00
Marten Seemann
1f644debd4
set if a stream contributes to connection flow control
...
This depends on the version. In gQUIC, stream 1 and 3 don't contribute,
in IETF QUIC only stream 0 doesn't contribute.
2017-11-04 15:22:14 +07:00
Marten Seemann
f662822486
use stream 0 for the crypto stream when using TLS
2017-11-04 15:22:07 +07:00
Marten Seemann
a1a4f35096
send initial version in the CHLO, not the current version
...
This commit fixes two bugs:
1. In the CHLO, we need to send the initial QUIC version. It will differ
from the current version if version negotiation was performed.
2. The session setup was using the wrong version (current version, and
not the initial version), such that we would have sent the wrong version
in the TLS handshake as well.
2017-11-02 21:51:51 +07:00
Marten Seemann
96f65f922f
Merge pull request #927 from lucas-clemente/fix-925
...
fix client handshake failure when the server supports unknown versions
2017-11-02 21:34:04 +07:00
Marten Seemann
b40d249953
reject packets that use the wrong or unknown packet types
2017-11-02 20:47:02 +07:00
Marten Seemann
3e6f66da79
rename the packet types according to recent draft changes
2017-11-02 18:31:04 +07:00
Marten Seemann
49e305f97f
Merge pull request #915 from lucas-clemente/fix-914
...
only use little endian byte order for gQUIC 37 and 38
2017-11-02 17:59:55 +07:00
Marten Seemann
43c23ff5fa
fix client handshake failure when the server supports unknown versions
2017-11-02 17:41:06 +07:00
Marten Seemann
aba1dd13ba
only use little endian byte order for gQUIC 37 and 38
...
That way, when adding new non-gQUIC versions, they will use big endian.
2017-11-02 16:46:22 +07:00
Marten Seemann
df13a0a970
implement the TLS Cookie extension
2017-11-02 16:45:43 +07:00
Marten Seemann
cc5f978996
Merge pull request #912 from lucas-clemente/fix-911
...
fix gQUIC version numbers
2017-10-30 19:46:36 +07:00
Marten Seemann
b0f34e776e
send IETF draft style version negotiation packets
...
Send a gQUIC Version Negotiation Packet, if the client packet has a
Public Header. If the client has an IETF draft style header, send an
IETF draft style Version Negotiation Packet.
2017-10-30 18:23:12 +07:00
Marten Seemann
f6e44e3e8e
fix gQUIC version numbers
2017-10-30 11:51:26 +07:00
Marten Seemann
3f62ea8673
set the Long Header packet type based on the state of the handshake
2017-10-29 14:08:08 +07:00
Marten Seemann
a65929f6cf
add logging for the packet header
2017-10-27 22:56:41 +07:00
Marten Seemann
3e39991e1e
use the non-blocking of mint to cycle through the handshake
2017-10-27 22:54:40 +07:00
Marten Seemann
fcc380187a
Merge pull request #899 from lucas-clemente/fix-898
...
encrypt unprotected packets with a connection-dependent key
2017-10-27 22:52:04 +07:00
Marten Seemann
4f86995e48
encrypt unprotected packets with a connection-dependent key
2017-10-27 17:35:08 +07:00
Marten Seemann
ddea1d83ab
use gomock to mock crypto.AEAD in the crypto setup tests
2017-10-27 17:35:08 +07:00
Marten Seemann
d98a11bb35
save version numbers such that can be written in big endian
...
This makes the version number representation consistent with the IETF
draft.
2017-10-27 17:24:24 +07:00
Marten Seemann
e81795e49b
Merge pull request #895 from lucas-clemente/new-header
...
implement the IETF draft Header
2017-10-27 17:18:15 +07:00
Marten Seemann
4556ad01e5
use the new packet header for connections using TLS
2017-10-27 16:54:47 +07:00
Marten Seemann
6c394acde7
never use a 6 byte packet number
...
According to the IETF draft, the only packet number lengths are 1, 2 and
4 bytes. With the given formula for the packet number derivation, we
would have only sent a 6 byte packet number if the difference between
the largest unacked and the current packet number exceeded 2^31, so this
would never have happened anyway.
2017-10-27 16:51:59 +07:00
Marten Seemann
bbe9affa27
reject version negotiation packets with an empty version list
2017-10-27 16:51:59 +07:00
Marten Seemann
7cb8e87580
implement parsing of IETF Version Negotiation Packets
2017-10-27 16:51:57 +07:00
Marten Seemann
fad279cb75
implement parsing and writing of the IETF QUIC Header
2017-10-27 16:51:04 +07:00
Marten Seemann
d7a09e7667
reject inconsistent final stream offsets
2017-10-27 16:39:41 +07:00
Marten Seemann
636bf4578c
error when receiving stream data with a larger offset than the final offset
...
This could happen when a peer send a STREAM frame with the Fin bit set,
and then sends STREAM frames with a higher offset.
2017-10-25 10:43:29 +07:00
Marten Seemann
ac82aeda8b
treat the connection ID as a big endian value
2017-10-25 10:09:15 +07:00
Marten Seemann
9825ddb43a
simplify the interaction with mint
2017-10-25 09:13:47 +07:00
Marten Seemann
282b423f7d
pass the crypto stream to the crypto setup constructor
...
The crypto stream is opened during the session setup. Passing it to the
crypto setup directly helps simplify the constructor.
2017-10-25 09:13:47 +07:00
Marten Seemann
a88da29433
Merge pull request #881 from lucas-clemente/improve-flow-controller
...
remove the flow control manager
2017-10-25 09:10:39 +07:00
Marten Seemann
e49ef8a90c
Merge pull request #889 from lucas-clemente/fix-connection-close-parsing
...
fix parsing of long reason phrases in CONNECTION_CLOSE frames
2017-10-25 09:10:16 +07:00
jbenoist
12d4e031bf
fix 0-RTT by moving cookie generation to server config
2017-10-24 13:27:50 +07:00
Marten Seemann
5556edbcad
fix parsing of long reason phrases in CONNECTION_CLOSE frames
2017-10-23 17:23:13 +07:00
Marten Seemann
268c3859fc
remove the flow control manager
2017-10-20 21:34:09 +07:00
Marten Seemann
6dc453caa3
use mockgen reflect mode
...
This requires a dirty hack to get mockgen to generate mocks for internal
packages.
2017-10-20 21:12:19 +07:00
Marten Seemann
e087ee7e9f
handle WINDOW_UPDATEs for streams and connection separately
...
In IETF QUIC, stream 0 is a valid stream ID, and is not used to encode
WINDOW_UPDATEs for the connection any more.
2017-10-20 21:12:19 +07:00
Marten Seemann
c53a83535e
split the flow controller in stream and connection flow controller
2017-10-20 21:12:19 +07:00
Marten Seemann
f3e9bf4332
remove the params negotiator
2017-10-20 18:08:21 +07:00
Marten Seemann
925a52f032
don't apply a limit to the number of outgoing streams
2017-10-20 17:35:30 +07:00
Marten Seemann
480db80da1
remove the receive flow control window from the params negotiator
...
The receive windows are not negotiated, they are just announced to the
peer.
2017-10-20 17:35:30 +07:00
Marten Seemann
f5acb690d3
simplify the maximum stream limit
2017-10-20 17:35:30 +07:00
Marten Seemann
daff6256b9
don't negotiate the maximum incoming streams value
...
The maximum number of incoming streams doesn't need to be negotiated. It
is a value that is only announced by the peer, and has to be respected.
Furthermore, Chrome doesn't seem to care about the MSPC value anymore
(since MIDS was introduced), so there's no need to send this in the
handshake any more.
2017-10-20 17:35:30 +07:00
Marten Seemann
5504c47ca5
reduce the maximum packet size of sent packets to 1200 bytes
...
This is the value the IETF draft mandates for implementations that don't
do PMTUD.
2017-10-18 14:14:49 +07:00
Marten Seemann
2f1db1c23d
fix data length check in STREAM frame parser
...
We should check if the rest of the STREAM frame contains enough bytes to
read the full data length, not if this overflows the MaxPacketSize
(which is the maximum packet size we use for sending, and has nothing to
do with receiving packets).
2017-10-18 13:54:28 +07:00
Marten Seemann
0e1a8a5f8c
move the max flow control increments out of the params negotiator
...
The params negotiator was just keeping track of the value set in the
quic.Config. The max flow control increments are not subject to
negotiation, but an independent implementation decision of every peer.
2017-10-04 07:16:16 -07:00