Marten Seemann
fc8fafd15e
pass a callback containing the callbacks to the stream
2017-12-20 11:49:05 +07:00
Marten Seemann
092908d3e0
simplify sending of (connection-level) BLOCKED frames
2017-12-20 10:23:17 +07:00
Marten Seemann
d49ad2d0cc
queue STREAM_BLOCKED frames from the stream, when popping a STREAM frame
2017-12-20 10:23:01 +07:00
Marten Seemann
2c83c9e3f0
don't send STOP_WAITING frames (for IETF QUIC)
2017-12-14 23:14:05 +07:00
Marten Seemann
8e1f62f749
when forcing a retransmittable packet, bundle the PING with other frames
...
We're sending a retransmittable packet every 20 packets (if there are no
other frames to send). To make a packet retransmittable, we add a PING
frame. We should bundle this PING with an ACK.
2017-12-12 23:10:43 +07:00
Marten Seemann
cd5e7ae177
remove unneeded function from the crypto stream interface
2017-12-12 18:30:08 +07:00
Marten Seemann
4b4e487486
remove the error return value from wire.Frame.MinLength
...
No functional change expected.
The error was only non-nil if some required values for the STOP_WAITING
frame were not set. It should be sufficient to throw an error when
attempting to write an invalid STOP_WAITING frame.
2017-12-12 17:33:04 +07:00
Marten Seemann
6019634286
pad Initial packets to the required minimum size (1200 bytes)
2017-12-08 11:50:43 +07:00
Marten Seemann
d7ceebd644
implement parsing and writing of the new ACK frame
2017-12-08 09:35:55 +07:00
Marten Seemann
11f746a183
implement parsing and writing of the new STREAM frames
2017-12-08 09:20:47 +07:00
Marten Seemann
25a6dc9654
implement stateless handling of Initial packets for the TLS server
2017-12-08 08:45:54 +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
f662822486
use stream 0 for the crypto stream when using TLS
2017-11-04 15:22:07 +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
4556ad01e5
use the new packet header for connections using TLS
2017-10-27 16:54:47 +07:00
Marten Seemann
5ee7b205c6
handle the crypto stream separately
2017-10-25 09:13:48 +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
268c3859fc
remove the flow control manager
2017-10-20 21:34:09 +07:00
Marten Seemann
f3e9bf4332
remove the params negotiator
2017-10-20 18:08:21 +07:00
Marten Seemann
709eec55b5
improve garbage collection of stream
...
This removes the Iterate method of the streamsMap, and moves the garbage
collection of closed streams from the session to the streamsMap.
2017-10-03 04:04:21 +08:00
Marten Seemann
9cb7480050
rename connection ID truncation to connection ID omission
2017-09-29 22:52:54 +07:00
Marten Seemann
c95f2054a8
rename the ConnectionParametersManager to ParamsNegotiator
2017-09-28 18:15:33 +07:00
Marten Seemann
95901cdee4
initialize the connection parameters manager in the crypto setup
2017-09-28 18:15:32 +07:00
Marten Seemann
e603715949
make handshake and crypto internal packages
2017-09-21 11:52:21 +07:00
Marten Seemann
8bcabe0ba9
correctly pack packets with sealers with different overheads
2017-09-08 12:04:45 +03:00
Marten Seemann
f1ada87dcf
make the protocol package internal
2017-08-30 00:19:44 +07:00
Marten Seemann
ed522ebbce
make wire an internal package
2017-08-29 23:51:56 +07:00
Marten Seemann
1794636220
more the PublicHeader to the wire package
2017-08-29 23:45:38 +07:00
Marten Seemann
88afad8722
rename package frames to wire
2017-08-29 23:27:15 +07:00
Marten Seemann
dd0daaaf1e
implement version-dependent parsing of the Public Header
2017-08-23 16:00:45 +07:00
Lucas Clemente
a0aba76df9
QueueControlFrameForNextPacket -> QueueControlFrame
2017-06-21 11:16:28 +02:00
Lucas Clemente
3300b6cef0
Store ackframe along with swf in the packet packer
2017-06-21 11:16:28 +02:00
Lucas Clemente
efc9ec5051
Add packer.SetLeastUnacked and remove the parameter from the Pack* functions
2017-06-21 11:16:28 +02:00
Lucas Clemente
ff8c75a22e
Send ACKs and SWFs even if we are congestion limited
...
Fixes #576 .
2017-06-20 23:41:36 +02:00
Lucas Clemente
f1c2163f14
Remove non-retransmittable logic from packer, this is now in ackhandler
2017-06-20 10:25:45 +02:00
Lucas Clemente
cbb640b093
Don't pass the stop waiting frame to the packer as a parameter
2017-06-20 10:25:45 +02:00
Lucas Clemente
495399ede6
Remove PackPacket's control frames parameter
...
With this change it would theoretically be possible for outdated control frames to be sent, but this is quite unlikely in practice.
2017-06-20 10:25:45 +02:00
Lucas Clemente
e43b91f633
Fix encryption of stream data
...
This commit splits up handling of the crypto stream and the other streams in the framer, crypto setup, and the packer.
- Crypto stream data is handled separately and should never be sent unencrypted or FW-secure. Fixes #544 .
- Non-crypto stream data is only sent with FW encryption on the server and only with non-FW or FW encryption on the client. Fixes #611 .
The crypto stream is current excluded from flow control (#657 ), but that shouldn't be an issue in practice for now.
2017-06-09 19:12:10 +02:00
Lucas Clemente
c02f904479
Mock CPM everywhere using gomock
2017-06-09 12:38:07 +02:00
Lucas Clemente
eeb2d8d821
Mock FlowControlManager using gomock
2017-06-08 16:06:31 +02:00
Marten Seemann
996fad14f8
remove unsafe from the session tests for the crypto setup
2017-05-16 10:55:55 +08:00
Marten Seemann
cb8bea73c7
implement a non-forward-secure session
2017-05-16 00:56:08 +08:00
Marten Seemann
adc4ef464a
simplify the CryptoSetup.SetDiversificationNonce interface
...
Pass the diversification nonce via a channel instead of setting it
directly. That way there is no need to protect the diversificationNonce
member by a mutex. Also prevents a possible deadlock that occurred when
SetDiversificationNonce was called before maybeUpgradeCrypto returned.
2017-05-11 21:56:41 +08:00
Marten Seemann
0a6a9551f8
close the aeadChanged chan when the handshake completes
...
This allows us to remove HandshakeComplete() from the CryptoSetup
interface. It also provides a signal to the session when the handshake
completes.
2017-05-09 18:40:23 +08:00
Lucas Clemente
e2a0d9f77c
Remove several unused fields and symbols
...
Detected with `unused -exports=true ./...`
2017-04-05 21:46:33 +01:00
Marten Seemann
2903f9b238
return a lambda to for sealing a packet in the CryptoSetup
2017-03-22 16:52:00 +07:00
Marten Seemann
28c115fee1
drop support for QUIC 34
...
fixes #368
2017-03-19 20:57:28 +07:00
Marten Seemann
8c5e7818a0
retransmit the diversification nonce in the packet carrying the SHLO
...
The packet containing the SHLO is the only packet that is sent with
initial encryption. If it is lost, we need to make sure that the
diversification nonce is included in the PublicHeader, otherwise the
client will not be able to derive the keys for the forward-secure
encryption.
2017-03-01 15:11:01 +07:00