Benjamin Saunders
3bcd9ad7f4
Implement ConnectionClose frame type field
2018-11-30 11:07:14 -08:00
Benjamin Saunders
c585fdcf6f
varint frame types
2018-11-30 11:07:14 -08:00
Benjamin Saunders
02ce6bcb25
Remove HandshakeFailed state
...
This duplication was made unnecessary by TLS alerts in transport errors.
2018-11-30 11:07:14 -08:00
Benjamin Saunders
1ce3c74cab
Draft-15 transport errors
2018-11-30 11:07:14 -08:00
stammw
9f631b80e1
Get rid of Crypto as an enum and work directly with CryptoContext
2018-11-29 10:45:00 +01:00
stammw
1793070e4e
Remove commented code in crypto
2018-11-29 10:45:00 +01:00
stammw
6745032cd4
Do not use CryptoState in Initial and OneRtt Crypto
2018-11-29 10:45:00 +01:00
Dirkjan Ochtman
c4c3ab1597
Remove unused ZeroRttCrypto type
2018-11-29 10:45:00 +01:00
stammw
00d258a2a7
Retain sealing and opening key in CryptoContext
2018-11-29 10:45:00 +01:00
Dirkjan Ochtman
6f4bf0f026
Move some logic from write_inner() into Send type
2018-11-27 19:44:54 +01:00
Dirkjan Ochtman
b7b85c028b
Don't create ConnectionLost events in handle_connected_inner()
...
This isn't needed, because handle_connected() will create them when an
error is returned from handle_connected_inner().
2018-11-27 19:44:54 +01:00
Dirkjan Ochtman
d96ef19268
Hoist creation of ConnectionLost events out of drive_tls()
2018-11-27 19:44:54 +01:00
Dirkjan Ochtman
d0d5e73a7f
Move guards from write_inner() to write()
2018-11-27 19:44:54 +01:00
Dirkjan Ochtman
41d9b3a2d2
Move read_unordered() logic into Recv type
2018-11-27 19:44:54 +01:00
Dirkjan Ochtman
9513f6fef3
Move read() logic into Recv type
2018-11-27 19:44:54 +01:00
dependabot[bot]
9a720434c7
Update rand requirement from 0.5 to 0.6
...
Updates the requirements on [rand](https://github.com/rust-random/rand ) to permit the latest version.
- [Release notes](https://github.com/rust-random/rand/releases )
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/rand/commits )
Signed-off-by: dependabot[bot] <support@dependabot.com >
2018-11-26 07:11:05 +01:00
Dirkjan Ochtman
f7e01ae1c9
Provide high-level API for getting stream references
2018-11-24 03:42:57 +01:00
Dirkjan Ochtman
449202b26c
Improve ordering of code in connection module
2018-11-24 03:42:57 +01:00
Dirkjan Ochtman
2a54c81090
Hoist event creation out of Connection::process_payload()
2018-11-24 03:42:57 +01:00
Dirkjan Ochtman
13a5991885
Include packet number length in length field
2018-11-23 18:47:11 +01:00
Dirkjan Ochtman
7efb934bb2
Set version to draft-15
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
b5f27aa7b4
Add tests for packet number encryption and decryption
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
2c21532ea6
Apply packet number encryption and decryption
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
4342c92712
Add support for ChaCha20 packet number encryption/decryption
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
929156469f
Add support for AES-128-CTR packet number encryption/decryption
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
ac2287e6c1
Implement new-style variable length packet number encoding
2018-11-20 09:08:41 +01:00
Benjamin Saunders
76cc763006
Implement draft 15 transport parameters
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
fe1a668047
Replace handshake crypto with draft-14 initial crypto
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
ae4701d387
Add support for different header types
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
3b2476ba63
Add convenience method to generate new connection IDs
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
1d97f24a27
Prevent extraneous copy of short packet connection ID
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
302eba170a
Store local CID length in Config
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
1380a8c4ea
Fix type for ConnectionId::random() len argument
2018-11-20 09:08:41 +01:00
Dirkjan Ochtman
911570e15e
Clarify data dependencies in Connection::next_packet()
2018-11-20 09:08:41 +01:00
Benjamin Saunders
7d02d4b2ed
Clarify some high-level documentation
2018-11-18 20:16:52 -08:00
stammw
16e3a49938
Get rid of Clone for ListenKeys
2018-11-18 08:10:59 -08:00
stammw
272f7a571f
Do not rebuild reset_token signing key on each reset
2018-11-18 08:10:59 -08:00
stammw
c53e97faf5
Remove Blake2 and use SHA512_256 for reset_token instead
2018-11-18 08:10:59 -08:00
Benjamin Saunders
6f4ec8b3b9
Tweak solicited RESET_STREAM error code to match recommendation
2018-11-16 17:30:32 -08:00
Dirkjan Ochtman
a19b346463
Upgrade to rand 0.6
2018-11-14 19:17:20 +01:00
Benjamin Saunders
d33b4ac126
Only emit UDP packets from tests when logging TLS keys
...
This prevents routine tests from failing due to UDP port collisions. Because key
logging is necessary for UDP packet inspection to be of much use, the same
environment variable is used to control both.
2018-11-09 23:45:03 -08:00
Benjamin Saunders
5bfc0492f8
Per-connection Logger
...
This allows log metadata to be shared between all messages on a specific
connection, and reduces the size of the Context struct.
2018-11-09 23:21:14 -08:00
Benjamin Saunders
4110ddf170
Factor stream state out into a private sub-structure
...
This allows us to narrow the scope of get_recv_stream's borrow.
2018-11-09 23:21:14 -08:00
Benjamin Saunders
563f43daa9
Isolate per-connection event polling
2018-11-09 23:21:14 -08:00
Dirkjan Ochtman
9f071bb2c1
Wrap comments in quinn-proto at 100 columns
2018-11-09 07:15:01 +01:00
Dirkjan Ochtman
848d6ed366
Remove unused memory_stream module
2018-11-09 07:15:01 +01:00
Dirkjan Ochtman
ea9ffcaef7
Explicitly make Connection methods private
2018-11-09 07:15:01 +01:00
Dirkjan Ochtman
39cbb10c2a
Complete packet decoding in one place
2018-11-09 07:15:01 +01:00
Dirkjan Ochtman
7ef63cea99
Keep Packet intact through decryption
2018-11-09 07:15:01 +01:00
Dirkjan Ochtman
8f7175cd6f
Inline Connection::update_keys() into decrypt_packet()
2018-11-09 07:15:01 +01:00