Commit Graph

2620 Commits

Author SHA1 Message Date
Benjamin Saunders 06b4873257 Isolate per-endpoint and per-connection configuration
This makes it easier to speak different application protocols on
different connections using the same endpoint
2019-01-27 07:19:47 +01:00
Benjamin Saunders 222c2d88c6 Implicit stream opening
A stream ID that is used out of order results in all streams of that
type with lower-numbered stream IDs also being opened. This allows
applications to assign meaning to incoming streams based on the order
in which they're opened.
2019-01-24 08:31:21 +01:00
Benjamin Saunders cd4607d7d8 Don't panic on missing client transport parameters 2019-01-24 07:33:29 +01:00
Dirkjan Ochtman 8d3abded71 Add helper method to determine side from TlsSession variant 2019-01-23 21:46:48 -08:00
Dirkjan Ochtman 48414a07f7 Add trait and impl for CryptoServerConfig 2019-01-23 21:46:48 -08:00
Dirkjan Ochtman 4e527d9925 Add trait and impl for CryptoClientConfig 2019-01-23 21:46:48 -08:00
Dirkjan Ochtman 4f4b8e6696 Extend the CryptoSession interface some more 2019-01-23 21:46:48 -08:00
Dirkjan Ochtman 9e48a0977a Use trait to abstract over TlsSession type 2019-01-23 21:46:48 -08:00
Dirkjan Ochtman b144b9a86b Hide creation of Crypto in TlsSession 2019-01-23 21:46:48 -08:00
Dirkjan Ochtman afe712f328 Move TransportParameters parsing into TlsSession 2019-01-23 21:46:48 -08:00
Benjamin Saunders 088c45e26a Remove identity conversions 2019-01-23 14:34:28 +01:00
Benjamin Saunders e85c320e7d Improve configuration error checking 2019-01-23 14:34:28 +01:00
Benjamin Saunders 1f35a803d8 Draft 18 recovery fixes 2019-01-23 14:34:28 +01:00
Benjamin Saunders 1dad005637 Draft 18 preferred_address 2019-01-23 08:35:23 +01:00
Benjamin Saunders bd3ec80990 Validate max_ack_delay parameter 2019-01-23 08:35:23 +01:00
Benjamin Saunders 008e197030 Rich transport errors
This folds some of our logging into the reason field for easier
debugging
2019-01-23 08:35:23 +01:00
Benjamin Saunders 25d61416e9 Remove redundant logging 2019-01-23 08:35:23 +01:00
Benjamin Saunders 6f7ac12c9a Remove redundant error check 2019-01-23 08:35:23 +01:00
Benjamin Saunders ebf9decfb2 Don't reject longer-than-necessary frame type encodings
The draft now describes this as optional, and it's less work to be
less picky.
2019-01-23 08:35:23 +01:00
Benjamin Saunders 64ac5fde0d Only validate 0-RTT transport parameters if 0-RTT is accepted 2019-01-23 08:35:23 +01:00
Benjamin Saunders aab4ff41cb Fix panic on Debug for weird TLS alerts 2019-01-23 08:35:23 +01:00
Benjamin Saunders 8037e5e7e3 Track latest received packet per packet number space
Fixes rare subtle errors in ACK delay accounting and simplifies the
logic.
2019-01-23 08:35:23 +01:00
Benjamin Saunders 1404c752b7 Update to latest STOP_SENDING validation logic
Implements a spec bug fix that allows STOP_SENDING to be reliably
applied to implicitly opened streams.
2019-01-23 08:35:23 +01:00
Benjamin Saunders 6a1fbf9940 Improve timeout counter overflow robustness 2019-01-23 08:35:23 +01:00
Benjamin Saunders 5cecb68f48 Handle overflow in idle timeout computation
This can arise from dubious configuration values or time inputs.
2019-01-23 08:35:23 +01:00
Benjamin Saunders adc41e4b2d Upper bound to PTO interval
Prevents overflow and improves worst-case latency on erratic links
with high idle timeouts.
2019-01-23 08:35:23 +01:00
Benjamin Saunders d80efde3e9 Fix handling of idle timeout 0 2019-01-23 08:35:23 +01:00
Benjamin Saunders dfd9a5d740 More robust idle timeout test 2019-01-23 08:35:23 +01:00
Benjamin Saunders 3a05cbc331 Update to latest idle timeout logic
As of today's draft changes, idle timeouts are no longer deferred by
retransmits in the absence of incoming packets.
2019-01-23 08:35:23 +01:00
Benjamin Saunders ef64df4664 Disable unidirectional streams explicitly in server example 2019-01-23 08:35:23 +01:00
Benjamin Saunders 9992be8fa1 Remove dead feature flag 2019-01-23 08:35:23 +01:00
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