Commit Graph

133 Commits

Author SHA1 Message Date
Dirkjan Ochtman e2bebbc108 Remove stray use statement 2018-05-02 12:04:26 +02:00
Dirkjan Ochtman 232b62728b Move Endpoint into new endpoint module 2018-05-02 12:01:17 +02:00
Dirkjan Ochtman ee9048ab0b Fix formatting with cargo fmt 2018-05-02 11:56:41 +02:00
Dirkjan Ochtman 205466a549 Clean up warnings in tests module 2018-05-02 11:56:26 +02:00
Dirkjan Ochtman d77188cd0e Add test for handshake encoding 2018-05-02 11:43:25 +02:00
Dirkjan Ochtman ca48982315 Let the Endpoint handle padding 2018-05-02 11:43:00 +02:00
Dirkjan Ochtman 51e1758890 Use correct side for decoding keys 2018-05-02 11:40:11 +02:00
Dirkjan Ochtman 05fb377b1b Assert on invalid ConnectionId lengths 2018-05-02 10:47:57 +02:00
Dirkjan Ochtman e254676d22 Fix encoding and decoding of CID lengths 2018-05-02 10:47:41 +02:00
Dirkjan Ochtman 9188fc010d Remove roundtrip test, doesn't work correctly 2018-05-02 10:28:44 +02:00
Dirkjan Ochtman ce112581a9 Implement draft 11 packet header 2018-05-01 16:45:57 +02:00
Dirkjan Ochtman a1cc695ac2 Implement new ConnectionId type for draft 11 2018-05-01 16:43:26 +02:00
Dirkjan Ochtman c293e273cc Implement BufLen for Vec<T: BufLen> 2018-05-01 16:42:06 +02:00
Dirkjan Ochtman 8353bdf05d Remove short headers while not needed 2018-05-01 15:48:54 +02:00
Dirkjan Ochtman af0c5963d5 Fix tests to construct endpoints directly 2018-05-01 15:09:01 +02:00
Dirkjan Ochtman 0b969f8742 Replace ServerStreamState with parametrized Endpoint 2018-05-01 11:58:05 +02:00
Dirkjan Ochtman d8909f2dd0 Use parametrized Endpoint instead of ClientStateStream type 2018-05-01 11:53:00 +02:00
Dirkjan Ochtman 7710e1af8b Store TLS implementation in Endpoint 2018-05-01 11:51:11 +02:00
Dirkjan Ochtman 341d8bfb42 Centralize handling of TLSResult values in a single place 2018-05-01 11:44:08 +02:00
Dirkjan Ochtman 6aedbe3867 Let Endpoint manage secrets 2018-05-01 11:07:41 +02:00
Dirkjan Ochtman 632a082781 Move Secret enum into crypto module 2018-05-01 10:33:08 +02:00
Dirkjan Ochtman 1466f9851d Move Side enum into types 2018-05-01 10:19:38 +02:00
Dirkjan Ochtman 9f4de23e7a Remove hs_cid from Endpoint (now tracked in tls) 2018-05-01 09:39:07 +02:00
Dirkjan Ochtman 6813e349c8 Let Endpoint construct Packets from payload 2018-05-01 09:28:37 +02:00
Dirkjan Ochtman 5da1e615dd Encrypt all handshake packets with handshake secrets 2018-04-30 16:58:02 +02:00
Dirkjan Ochtman c3acc20fd9 Make ptype() method available on Header 2018-04-30 16:57:24 +02:00
Dirkjan Ochtman b75a3f211e Pass packet header to all key provisioning methods 2018-04-30 16:50:12 +02:00
Dirkjan Ochtman 62d6b78086 Adapt to changed rustls APIs 2018-04-30 16:18:56 +02:00
Dirkjan Ochtman 8c8fc98380 Implement encryption with 1-RTT keys 2018-04-30 16:15:30 +02:00
Dirkjan Ochtman 846957c3f6 Generalize creation of packet keys 2018-04-30 15:49:08 +02:00
Dirkjan Ochtman 6078e40e27 Fix formatting with cargo fmt 2018-04-30 15:45:43 +02:00
Dirkjan Ochtman 76382888eb Let TLS types store connection secrets 2018-04-30 15:45:43 +02:00
Dirkjan Ochtman 6eff7b845e Use ServerTls struct to wrap TLS ServerSession 2018-04-30 13:23:08 +02:00
Dirkjan Ochtman 14d75a0fa9 Move tls::build_server_config() to tls::ServerTls::build_config() 2018-04-30 13:10:46 +02:00
Dirkjan Ochtman 0d671d6ff0 Move tls::build_client_config() into tls::ClientTls 2018-04-30 13:07:35 +02:00
Dirkjan Ochtman 19eb91c72b Rename tls::Client to ClientTls 2018-04-30 13:05:28 +02:00
Dirkjan Ochtman 8215e03b93 Move handling of keys inside state types 2018-04-30 13:02:09 +02:00
Dirkjan Ochtman 7ea2aa231a Add test for encoding roundtrip 2018-04-27 14:44:11 +02:00
Dirkjan Ochtman de4f35b5e6 Derive PartialEq for more types to support testing 2018-04-27 14:43:59 +02:00
Dirkjan Ochtman 7e9bed3672 Store buffer in PartialDecode 2018-04-27 08:22:01 +02:00
Dirkjan Ochtman 46d70f0170 Use slices instead of manipulating buffer sizes 2018-04-27 08:14:30 +02:00
Dirkjan Ochtman bb193a27c3 Construct endpoint inside ServerStreamState 2018-04-26 17:29:35 +02:00
Dirkjan Ochtman b153eb448a Add new() method for ClientStreamState 2018-04-26 17:25:56 +02:00
Dirkjan Ochtman 390181a0ad Stop passing around ThreadRng explicitly 2018-04-26 17:25:56 +02:00
Dirkjan Ochtman 624d4d9fd1 Properly reset server input buffer after handling packet 2018-04-26 17:12:09 +02:00
Dirkjan Ochtman 5cd6d4efc1 Set up framework for testing protocol flow 2018-04-26 16:14:35 +02:00
Dirkjan Ochtman d8a68fb005 Make high-level stream state struct APIs pub(crate) 2018-04-26 16:14:35 +02:00
Dirkjan Ochtman 3a9192847d Allow TLS client to be parametrized with trust anchors 2018-04-26 16:14:35 +02:00
Dirkjan Ochtman 4787bac2c7 Rename Connection to ServerStreamState 2018-04-26 14:39:02 +02:00
Dirkjan Ochtman 0f65671013 Fix formatting some more 2018-04-26 13:42:58 +02:00