Commit Graph

105 Commits

Author SHA1 Message Date
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 a6b24891c4 Add TLS test certificates and CA 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
Dirkjan Ochtman 08cbec9d0f Give handle() methods the same type 2018-04-26 13:41:47 +02:00
Dirkjan Ochtman 69b90cf349 Move creation of Initial packet into ClientStreamState 2018-04-26 13:27:34 +02:00
Dirkjan Ochtman 5b08057740 Move packet handling into ClientStreamState 2018-04-26 13:22:09 +02:00
Dirkjan Ochtman 6884a3b91e Move client's stream state into a separate struct 2018-04-26 13:16:54 +02:00
Dirkjan Ochtman fa2e68009e Move Connection initialization into new() method 2018-04-26 13:03:54 +02:00
Dirkjan Ochtman 985ee13cb4 Simplify offset types in decoding 2018-04-25 18:14:25 +02:00
Dirkjan Ochtman 5e709018b8 Improve formatting with cargo fmt 2018-04-25 18:00:36 +02:00
Dirkjan Ochtman 9dde05ae8f Split decoding in order to allow header-dependent packet keys 2018-04-25 17:56:55 +02:00
Dirkjan Ochtman 214c9ce99d Use Endpoint in server Connection objects 2018-04-25 17:18:50 +02:00
Dirkjan Ochtman 71e5ab38d7 Don't return from poll() while making progress 2018-04-25 16:03:12 +02:00
Dirkjan Ochtman d581ea2291 Let client send follow-up Handshake package 2018-04-25 16:03:12 +02:00
Dirkjan Ochtman 3d23a3b814 Add new tls::Client::process_handshake_messages() method 2018-04-25 16:03:12 +02:00
Dirkjan Ochtman e4bacedd7a Store separate handshake CID in Endpoint 2018-04-25 16:03:12 +02:00
Dirkjan Ochtman d3de8da259 Decode server-originated handshake packets 2018-04-25 16:03:12 +02:00
Dirkjan Ochtman cb602de2a6 Pass in key type when decoding packets 2018-04-25 16:03:12 +02:00
Dirkjan Ochtman 06b5191d00 Move client code into new client module 2018-04-25 16:02:18 +02:00
Dirkjan Ochtman 8634105ac9 Rebuild client connect as a future 2018-04-25 16:02:18 +02:00
Dirkjan Ochtman 63655d1032 Add intermediate certificates to example server chain 2018-04-25 14:55:15 +02:00
Dirkjan Ochtman f32beaac69 Start to organize the client code 2018-04-24 17:37:53 +02:00
Dirkjan Ochtman 8680848708 Remove unused type NegotiationPacket 2018-04-24 17:11:29 +02:00
Dirkjan Ochtman 1cfec456f4 Add ACK frame to initial server response 2018-04-24 17:11:29 +02:00
Dirkjan Ochtman abca4337d1 Remove unused FrameType type 2018-04-24 17:11:29 +02:00
Dirkjan Ochtman ce19e15a30 Add data structure for ACK frames 2018-04-24 17:11:29 +02:00
Dirkjan Ochtman eea7191cc6 Derive PartialEq for Frame types 2018-04-24 16:32:48 +02:00
Dirkjan Ochtman 63da55fda5 Use new rustls APIs to send ServerHello 2018-04-24 16:04:55 +02:00
Dirkjan Ochtman 442987b8d5 Adapt to changes rustls API for client handshakes 2018-04-24 14:00:19 +02:00
Dirkjan Ochtman ac00a89c92 Add README 2018-04-24 13:35:27 +02:00
Dirkjan Ochtman 8af45e0955 Increase buffer sizes to accomodate all non-jumbogram packets 2018-04-23 16:42:10 +02:00
Dirkjan Ochtman 79b566ed9f Move server code into a new server module 2018-04-23 16:23:49 +02:00
Dirkjan Ochtman 6d1b88d874 Resize buffer after decoding packets 2018-04-23 16:18:05 +02:00
Dirkjan Ochtman 470b27971d Rework public Packet interface 2018-04-23 16:03:43 +02:00
Dirkjan Ochtman 7c15e6a91a Rename proto module to packet 2018-04-23 15:57:58 +02:00
Dirkjan Ochtman 97348eb8d8 Improve formatting 2018-04-23 15:56:43 +02:00
Dirkjan Ochtman ad476345bc Ignore keys and certificates 2018-04-23 15:55:43 +02:00