Benjamin Saunders
7338f7b1e4
Fix panic on receiving 0-RTT headers
2019-01-04 11:46:44 +01:00
Benjamin Saunders
60bf13acff
Mark client Initial authenticated before processing for consistency
2019-01-04 11:46:44 +01:00
Benjamin Saunders
eef1ba31f7
Improve unsafe code defensiveness
2019-01-04 11:46:44 +01:00
Benjamin Saunders
58dd5daade
Fix feature-gated type reference
2019-01-04 01:22:55 -08:00
Benjamin Saunders
07384a920e
Add missing documentation
2019-01-04 01:22:55 -08:00
Benjamin Saunders
37c664ec0a
Fix copy-paste error
2019-01-04 01:22:55 -08:00
Benjamin Saunders
32b4ed7c8e
Hide rustls certificate types and parsing methods
...
This decouples an important part of the API from rustls, and greatly
simplifies the task of robustly reading a certificate from disk.
2019-01-03 23:10:22 -08:00
Benjamin Saunders
2aa8e30a64
Delete dead macro_use
2019-01-02 08:11:00 +01:00
Benjamin Saunders
3e7961ad37
Backwards-compatible IP_TOS sendmsg use
...
Linux required IP_TOS to be set as an int prior to 2016 kernel commit
e895cdce683161081e3626c4f5a5c55cb72089f8, even though it's a u8 when
read via IP_RECVTOS.
2019-01-02 08:11:00 +01:00
Benjamin Saunders
b5dbe2b602
Independently test IPv4, IPv6, and dual-stack connections
2019-01-02 08:11:00 +01:00
Benjamin Saunders
d47c8b8430
Don't send to IPv4 addrs on IPv6 sockets
...
This fixes dual-stack operation on less recent Linux kernels, and
reduces the rate of address conversion to once per connection by
assuming that dual-stack sockets will always yield IPv4-mapped IPv6
addresses.
2019-01-02 08:11:00 +01:00
Benjamin Saunders
15ce3f0be2
Handshake anti-deadlock
...
Servers may only send at most 3x received data until address
verification is complete, so large handshakes or packet loss may
require the client to send dummy packets.
2019-01-01 13:52:51 +01:00
Benjamin Saunders
a1f248ee38
Test dropped server handshake messages
2019-01-01 13:52:51 +01:00
Benjamin Saunders
e2bd393a9d
Implement handshake anti-amplification
2019-01-01 13:52:51 +01:00
Benjamin Saunders
f529a0481f
Delete dead code
2019-01-01 13:52:51 +01:00
Benjamin Saunders
652c7559ef
Fix congestion blocking ACK-only packets
2019-01-01 13:52:51 +01:00
Benjamin Saunders
7d4055da6d
Fix probes being blocked by lack of pending data
2019-01-01 13:52:51 +01:00
Benjamin Saunders
4555aa4bf7
Cosmetic fixes
2019-01-01 13:52:51 +01:00
Benjamin Saunders
4d8260b57e
Immediately fail the high-level test on unexpected errors
2018-12-31 10:25:36 +01:00
Benjamin Saunders
4ef0480bbb
Signal connection tasks when the driver is lost
...
This isn't normally expected, but should reduce confusion in corner
cases.
2018-12-31 10:25:36 +01:00
Benjamin Saunders
43d321bdfc
Update block-modes to 0.3
2018-12-31 00:29:35 -08:00
Benjamin Saunders
b84f22f64f
Use test vectors from upstream
2018-12-31 07:03:16 +01:00
dependabot[bot]
2008cb6eca
Update orion requirement from 0.11 to 0.12
...
Updates the requirements on [orion](https://github.com/brycx/orion ) to permit the latest version.
- [Release notes](https://github.com/brycx/orion/releases )
- [Commits](https://github.com/brycx/orion/commits/0.12.0 )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-12-31 07:00:19 +01:00
Benjamin Saunders
4bbe0d825f
Delete dead code
2018-12-30 23:03:56 +01:00
Benjamin Saunders
0abbff72a9
Move SocketAddr normalization into Endpoint
...
This reduces the amount of conversion necessary.
2018-12-30 23:03:56 +01:00
Benjamin Saunders
6f5dd2dc4d
Fix Linux IPv4 UDP socket setup
2018-12-30 23:03:56 +01:00
Dirkjan Ochtman
af66816f06
Add CI for macOS
2018-12-30 22:26:20 +01:00
Benjamin Saunders
97301a93a4
Extract in-flight statistics struct
...
This makes it easier to manipulate while borrowing a space.
2018-12-30 21:56:15 +01:00
Benjamin Saunders
cf5ec4aff4
Set ALPN ID in interop tool
...
ngtcp2 unconditionally pretends we negotiated hq-17, which confuses
rustls if we didn't.
2018-12-30 21:56:15 +01:00
Dirkjan Ochtman
535f8b2af3
Add test for quinn API layer
2018-12-30 12:43:17 -08:00
Dirkjan Ochtman
ace2b168e8
Reorder code in example server to improve locality
2018-12-30 12:43:17 -08:00
Dirkjan Ochtman
3c17fcdfff
Assorted clippy fixes
2018-12-30 09:47:21 +01:00
Benjamin Saunders
5333024917
Update draft version and tweak wording in README
2018-12-29 23:38:18 -08:00
Benjamin Saunders
85008856e0
Clients MUST discard packets from new addresses
2018-12-30 07:30:32 +01:00
Benjamin Saunders
93d9b97675
PATH_RESPONSE shouldn't be retransmitted
2018-12-30 07:30:32 +01:00
Benjamin Saunders
abd0713076
Don't pad ACK-only client Initial packets
...
Only the first Initial packet, containing the CRYPTO frame(s), must be
padded.
2018-12-30 07:30:32 +01:00
Benjamin Saunders
296ef0c75c
Tweak logging
2018-12-30 07:30:32 +01:00
Benjamin Saunders
aeb58b2d81
Restore stateless retry support to the example server
2018-12-30 07:30:32 +01:00
Benjamin Saunders
fe9c5fd157
Enable all features in CI
2018-12-30 07:30:32 +01:00
Benjamin Saunders
ed98e9aa96
Test retries by default with interop tool
2018-12-30 07:30:32 +01:00
Benjamin Saunders
67b54b7419
Fix interop tool false negatives on D
2018-12-30 07:30:32 +01:00
Benjamin Saunders
7517f5e4f2
Fix interop helper build
2018-12-30 07:30:32 +01:00
Benjamin Saunders
3a82358423
Simplify and debug header protection sampling
...
The sample offset is now always exactly 4 bytes after the PN offset,
so much extra computation is now unnecessary, and some interfaces can
be simplified. As a bonus, a bug in the redundant computation was
eliminated in the process.
2018-12-30 07:30:32 +01:00
Benjamin Saunders
289a2a2835
Delete redundant check
2018-12-30 07:30:32 +01:00
Benjamin Saunders
3086295fb7
Fix premature handshake key discard
...
1-RTT packets may be sent before the handshake has genuinely
completed, making the prior logic wrong.
This approach relies on the inference that if the server has sent any
Handshake ACK in the Established state, there is no need to retransmit
any outstanding CRYPTO data. This holds because the server cannot
enter Established until the client has fully completed the handshake,
so any outstanding CRYPTO data must be a spurious retransmit, and need
not be reliably delivered.
2018-12-30 07:30:32 +01:00
Benjamin Saunders
9b41a8acc5
Reject consecutive key updates
2018-12-29 14:27:06 -08:00
Benjamin Saunders
09468d5a7a
Implement timer-based key discard
2018-12-29 14:27:06 -08:00
Benjamin Saunders
962a63d1d3
Style fix
2018-12-29 14:27:06 -08:00
Benjamin Saunders
a83592bc47
Discard client's Initial space only on Handshake actually sent
...
No ultimate behavioral change here so long as handshake keys are
unavailable to clients until after all Initial CRYPTO data has been
transmitted, but less fragile: discarding the previous space in
write_tls is only correct if the write attempt generated no data.
2018-12-29 14:27:06 -08:00
Benjamin Saunders
f1db8789bf
Look up AEAD tag length from negotiated cipher
...
Futureproofs against new AEAD algorithms.
2018-12-29 14:27:06 -08:00