Marten Seemann
a79e9ee35e
parse and write STOP_WAITING frames for packet number 0
2017-12-07 21:33:34 +07:00
Marten Seemann
6ce3336be5
parse and write ACKs that for packet number 0
2017-12-07 21:33:34 +07:00
Marten Seemann
196efa873d
Merge pull request #990 from lucas-clemente/fix-989
...
don't send a window update after the final offset was received
2017-12-07 18:55:19 +07:00
Marten Seemann
f51cfe9fe3
don't send a window update after the final offset was received
...
Receiving a final offset means the peer is done sending on that stream,
and there's no need to grant additional flow control credit.
2017-12-07 18:22:39 +07:00
Marten Seemann
7ba613c3b9
use the mint default cookie protector to encrypt and decrypt cookies
2017-12-07 18:20:22 +07:00
Marten Seemann
80a827f133
fix the crypto setup so that it works with the recent mint changes
...
mint now supports stateless retries, and requires that the cookie
protector is set in the mint.Config and returns a new alert when a
retry is performed.
2017-12-07 13:49:45 +07:00
Marten Seemann
8c2404edf5
send a reserved version number in the SHLO
2017-12-06 10:20:22 +07:00
Marten Seemann
1a3852aec6
send a reserved version number in the EncryptedExtensions message
2017-12-06 10:20:22 +07:00
Marten Seemann
be29963637
send a reserved version number in version negotiation packets
2017-12-06 10:20:22 +07:00
Marten Seemann
1f5cd31569
implement a function to get version slices containing reserved versions
2017-12-06 10:20:16 +07:00
Marten Seemann
45e43ada40
implement the recent changes to the version negotiation packet
2017-12-06 08:40:43 +07:00
Marten Seemann
7487dc22bf
Merge pull request #977 from lucas-clemente/fix-971
...
update validation of version negotiation
2017-12-06 07:02:49 +07:00
Marten Seemann
b070fcbd43
Merge pull request #976 from lucas-clemente/fix-973
...
make initial_max_stream_id optional and parse initial_max_stream_id_uni
2017-12-06 06:58:15 +07:00
Marten Seemann
ce70ba497d
Merge pull request #968 from lucas-clemente/remove-ack-every-20-packets
...
remove old code to send an ACK every 20 packets
2017-12-06 06:57:23 +07:00
Marten Seemann
7c8715616e
update validation of version negotiation
...
The negotiated_version parameter was recently moved from the
client_hello TLS handshake message to the encrypted_extensions.
2017-12-05 10:35:04 +07:00
Marten Seemann
c30064bb51
parse TLS extensions containing the initial_max_stream_id_uni parameter
...
We're not sending the initial_max_stream_id_uni parameter, which
implicitely sets this value to 0, i.e. the peer is not allowed to open
unidirectional streams.
2017-12-05 09:17:43 +07:00
Marten Seemann
a72efca38d
don't require the initial_max_stream_id in the transport parameters
...
The draft was recently changed to make this value optional.
2017-12-05 08:56:49 +07:00
Marten Seemann
184f81d8c4
remove old code to send an ACK every 20 packets
...
This was needed before QUIC 39, and should have been removed when we
dropped support for QUIC 38.
2017-12-01 12:14:54 +07:00
Marten Seemann
f440a65ef1
move the version field in front of the packet number in the long header
...
This was recently changed in the IETF draft.
2017-11-30 11:34:34 +07:00
Marten Seemann
4076ab587e
add a string representation for the Long Header packet types
2017-11-22 15:57:22 -08:00
Jan Rüth
281fec1b2d
Make error chan not block for a single write, allowing ParseHandshakeMessage goroutine to gracefully exit
2017-11-22 09:54:03 +01:00
Marten Seemann
683f244054
rename the Cleartext Long Header type to Handshake
...
This was recently changed in the draft.
2017-11-13 10:55:33 +08:00
Marten Seemann
7c3d6abb4b
fix parsing of the Header type byte
...
In order to determine if a packet is a Version Negotiation Packet, it is
not sufficient to just look at bit 0x1. Other packet types also have
that bit set, e.g. the Retry packet (packet type 0x3). Instead, we have
to look at the last 3 bits. This fix will work as long as IETF QUIC
doesn't define more than 8 long header types.
2017-11-13 10:23:17 +08:00
Marten Seemann
234d5aab36
echo the offered version in IETF Version Negotiation Packets
2017-11-12 14:37:43 +08:00
Marten Seemann
11364cbd81
fix encoding of the idle timeout for the TLS transport parameters
2017-11-11 19:48:41 +08:00
Marten Seemann
5d4174b2f0
parse the packet header before getting the session from the session map
2017-11-10 08:48:45 +07:00
Marten Seemann
bc1ef31531
accept Public Resets without the RSEQ tag
...
The RSEQ tag is mandatory according to the gQUIC spec, however, Google
doesn't include that tag in its Public Resets.
2017-11-08 11:07:53 +07:00
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