Benjamin Saunders
d5ad558181
Bump versions
0.2.0
2019-01-21 07:24:28 +01:00
Benjamin Saunders
1831489dae
Don't drop tokio state until connections are dropped AND drained
...
This avoids panics in both method calls and events.
2019-01-21 07:24:28 +01:00
est31
460a704254
Update to crates.io version of rustls
2019-01-20 22:08:27 +01:00
Benjamin Saunders
530e511609
Wake up driver on connect
...
Fixes a deadlock
2019-01-20 07:37:35 +01:00
Benjamin Saunders
76f7097776
Drop tokio connection state on drained, not drop
...
This ensures we have context for all events.
2019-01-20 07:37:35 +01:00
Benjamin Saunders
4eae666c6b
Isolate packet transmit and timer update
...
This allows us to defer composing packets when UDP is blocked,
reducing latency and memory requirements. UDP can become blocked when
we're generating packets faster than they can be transmitted.
2019-01-20 07:37:35 +01:00
Benjamin Saunders
82059b57fd
Don't retransmit CONNECTION_CLOSE in response to offpath packets
...
This helps avoid an amplification attack.
2019-01-20 07:37:35 +01:00
Benjamin Saunders
92f59031de
Stop idle timer when connection starts to close
...
Fixes a bug where the stop would get lost when the connection state is
discarded by the endpoint.
2019-01-20 07:37:35 +01:00
Benjamin Saunders
98edfa103f
Allow callers to determine when a close has been acknowledged
2019-01-20 07:37:35 +01:00
Benjamin Saunders
a9d43c34d6
Emit Handshaking event for incoming connections
...
This allows 0.5-RTT data to be supported gracefully by callers.
2019-01-20 07:37:35 +01:00
Dirkjan Ochtman
3a1b5584ed
Only call handle_coalesced() if necessary
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
b8adc7a8d9
Always pass all datagram contents to Connection in one go
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
ea7aa02091
Move conn_ready() around to improve readability
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
5ee5d5d5ee
Improve ordering of items in quinn crate root
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
c5c591f5b9
Reflow comments in quinn crate root
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
ab68eacfd5
Move ConnectionHandle into endpoint module
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
536cbe4c50
Use Index/IndexMut to abstract use of ConnectionHandle
2019-01-18 09:09:29 +01:00
Dirkjan Ochtman
f95e89e3bd
Improve naming of ConnectionHandle variable bindings
2019-01-18 09:09:29 +01:00
Benjamin Saunders
e73fadaa6f
Support user-supplied DER certificates in the server example
...
This is the type we generate and cache by default, so it's weird not
to handle it.
2019-01-18 08:08:19 +01:00
Benjamin Saunders
2b96ccee36
Typo fix
2019-01-18 08:08:19 +01:00
Benjamin Saunders
5e75853bdd
Add a missing STREAM_STATE_ERROR, correct PROTOCOL_VIOLATIONs
2019-01-18 08:08:19 +01:00
Benjamin Saunders
44bdb84a8a
Discard queued 0-RTT frames on 0-RTT rejected.
2019-01-17 09:36:30 +01:00
Benjamin Saunders
87761b8569
Don't send RESET_STREAM or STOP_SENDING in 0-RTT
...
It's unreasonable to forbid applications from abandoning 0-RTT
streams, so we should handle this case gracefully.
2019-01-17 09:36:30 +01:00
Benjamin Saunders
95430342c4
STOP_STREAM opens remotely initiated bidirectional streams
2019-01-17 09:36:30 +01:00
Benjamin Saunders
35255ad25d
Locally initiated streams are implicitly known to the application
2019-01-17 09:36:30 +01:00
Benjamin Saunders
f833af202b
More concise transport error description phrasing
2019-01-17 09:36:30 +01:00
Benjamin Saunders
accd11b893
Replace failure with err-derive
...
This makes our error types more standard and removes a foreign trait
from our public API.
2019-01-17 09:36:30 +01:00
Benjamin Saunders
24d061dba3
Test flow control
...
Validates 04c16794
2019-01-16 20:22:51 -08:00
Benjamin Saunders
1b8d418abe
Delete unnecessary address change in test
...
This was a workaround for the bug fixed in 2f16dc7a
2019-01-16 20:22:51 -08:00
Dirkjan Ochtman
dadb0b486f
Use *ring* for header protection ( fixes #196 )
2019-01-16 10:16:52 +01:00
Benjamin Saunders
e4c51baf64
Factor out common stream read code
2019-01-16 08:22:03 +01:00
Benjamin Saunders
04c167942e
Fix flow control leak on RESET_STREAM and process resets eagerly
...
We weren't issuing additional flow control credit to account for the
bytes that the peer thinks it's sent but which we haven't read yet. As
part of this change, we've gone from keeping data on reset streams
around until it's read and issuing credit as that proceeds to
discarding data on reset streams immediately and issuing credit for
all outstanding data on the stream, whether or not we've received and
buffered it.
2019-01-16 08:22:03 +01:00
Benjamin Saunders
e75c33e180
Detect another FINAL_OFFSET_ERROR case
2019-01-16 08:22:03 +01:00
Benjamin Saunders
b6502a13a8
Don't let Handshake packets validate 1-RTT migration
2019-01-16 08:22:03 +01:00
Benjamin Saunders
d5aecaeb16
Don't forget about new streams if more than one arises at once
2019-01-16 08:22:03 +01:00
Benjamin Saunders
f31bb03cc0
Delete obsolete commented code
2019-01-14 22:56:07 -08:00
Benjamin Saunders
fce220ca34
Handle EINTR
2019-01-14 22:56:07 -08:00
Benjamin Saunders
074a5f6206
Cleanup
2019-01-14 22:56:07 -08:00
Benjamin Saunders
ebf865e384
Sanity-check post-0-RTT transport parameters
2019-01-14 22:56:07 -08:00
Benjamin Saunders
17efaa89a5
Remove redundant field
2019-01-14 22:56:07 -08:00
Benjamin Saunders
0947109f83
Extract builders module
2019-01-14 22:56:07 -08:00
Benjamin Saunders
b7129bc034
Remove unused dependency
2019-01-14 22:56:07 -08:00
Benjamin Saunders
42685091d0
Improve documentation
2019-01-14 22:56:07 -08:00
Benjamin Saunders
b58d1e829d
Clarify window semantics
2019-01-12 10:04:42 -08:00
Benjamin Saunders
86967a8089
Tweak diagnostics
2019-01-12 10:04:42 -08:00
Benjamin Saunders
6ffabd73ae
Reject new CRYPTO data at illegal encryption levels
2019-01-12 10:04:42 -08:00
Benjamin Saunders
1e403dc290
Reject illegal 0-RTT frames
2019-01-12 10:04:42 -08:00
Benjamin Saunders
8feebb589a
Test 0-RTT rejection
2019-01-12 10:04:42 -08:00
Benjamin Saunders
a4bf8bc169
Strengthen 0-RTT test
2019-01-12 10:04:42 -08:00
Dirkjan Ochtman
ec794de8ba
Don't allocate for Initial header's token
2019-01-12 09:23:24 -08:00