Commit Graph

58 Commits

Author SHA1 Message Date
Nick Mathewson 302653977d Bump dependencies with "cargo upgrade" 2021-03-06 08:55:13 -05:00
Nick Mathewson 95c71aff91 clippy warning on msg.rs 2021-03-04 11:54:14 -05:00
Nick Mathewson 564bf104d5 Change how we sort link specifiers in extend cells
Instead of implementing a dubious PartialOrd for link spec, add a
sorting function and call that explicitly.
2021-03-04 11:13:22 -05:00
Nick Mathewson 2c8a6de8ac Avoid an is_some()/unwrap() pair in End cell parsing 2021-03-04 11:12:35 -05:00
Nick Mathewson ab9d4a2229 Update some dependencies. 2021-02-19 09:39:23 -05:00
Nick Mathewson a27eeb1e61 Migrate from futures_codec to asynchronous_codec.
asynchronous_codec is a fork of futures_codec that is up-to-date on
its dependencies.

This migration allows us to upgrade to the current version of the
bytes crate.
2021-01-15 17:01:07 -05:00
Nick Mathewson e2997477a8 Remove unused futures_codec in tor-cell/fuzz 2021-01-15 16:11:34 -05:00
Nick Mathewson f01d641ec8 cargo upgrade. 2020-12-30 15:59:33 -05:00
Nick Mathewson cae16665cb Basic support for IPv6 and begin flags.
We now have a way to tell a circuitmgr whether we require ipv4/ipv6
support for a target address in an exit policy, and we use similar
logic to set begin flags.
2020-12-15 14:41:03 -05:00
Nick Mathewson affe5c5c53 Use a set of named flags for BeginFlags in tor-cell. 2020-12-15 14:08:36 -05:00
Nick Mathewson 7ecfa4c863 Remove a couple of stray dbg!() calls. 2020-11-19 19:23:34 -05:00
Nick Mathewson 4d24fff9c0 Upgrade dependencies 2020-11-10 12:27:10 -05:00
Nick Mathewson 0db18afa39 tor-cell: In netinfo, unspecified addresses are None. 2020-10-29 17:03:12 -04:00
Nick Mathewson 705d9c061f Add a test for extending a circuit with ntor. 2020-10-27 14:26:22 -04:00
Nick Mathewson 8f5d239c21 Expand test to handle building circuit with ntor. 2020-10-27 12:23:18 -04:00
Nick Mathewson ee9ad7f59d Run "cargo upgrade". 2020-10-26 14:56:06 -04:00
Nick Mathewson b93e4b76c8 Remove a bunch of dbg! calls. 2020-10-26 14:33:14 -04:00
Nick Mathewson 94231230b0 Improve documentation in tor-cell 2020-10-26 11:51:11 -04:00
Nick Mathewson fa01a50f32 Rename CircID and StreamID to end with Id instead, for consistency 2020-10-25 20:29:01 -04:00
Nick Mathewson 4bddde1b83 A few coverage-driven tests in tor-cell. 2020-10-21 10:49:04 -04:00
Nick Mathewson 9a9e2fe43b Specify and test correct handling for bogus netinfo addrs 2020-10-21 10:30:56 -04:00
Nick Mathewson 743c3167e8 Rename as_message to into_message.
According to the API guidelines, "as_" is only for
borrowed->borrowed conversions.
2020-10-21 08:05:33 -04:00
Nick Mathewson 1dc3fc214a Implement From, not Into.
These traits are inverses of one another, but implementing From is
always preferred since rust 1.41 relaxed the "orphan rules".
2020-10-19 17:40:43 -04:00
Nick Mathewson 16d8b267bc Resolve remaining XXXXM3 stuff in tor-cell 2020-10-19 14:36:31 -04:00
Nick Mathewson 88a012a9b0 Add assertions for overflow cases in relaycell::msg 2020-10-19 14:25:12 -04:00
Nick Mathewson 3d35f64742 Add assertions for overflow cases in chancell::msg 2020-10-19 14:22:59 -04:00
Nick Mathewson 2bd30f2db3 Use DestroyReason for Truncated messages. 2020-10-19 13:38:15 -04:00
Nick Mathewson e83d8ec3c2 Turn End reasons into a caret enumeration. 2020-10-19 13:31:46 -04:00
Nick Mathewson f2ebc94088 Add relay commands for circuit padding. 2020-10-19 13:30:36 -04:00
Nick Mathewson 378aa6d639 Add an enumeration for destroy reasons. 2020-10-19 13:13:55 -04:00
Nick Mathewson 5523134607 Mark must-resolve XXXX issues with "XXXXM3".
"M3" is for "milestone 3" -- my target to fix the technical debt
that I think will be bad if we ship even a pre-alpha with it.

These aren't necessarily _all_ must-resolve, but they're all
must-look-at.

Closes #15
2020-10-18 17:38:59 -04:00
Nick Mathewson 311d060037 Remove a comment about a spec clarification
This was fixed as torspec#30
2020-10-18 16:59:45 -04:00
Nick Mathewson 3408c9ad26 Run "cargo upgrade". 2020-10-15 13:32:02 -04:00
Nick Mathewson 3631b2bfdc Document all the private items in tor-cell
Also, change the type of the authentication challenge to be an
array; it isn't in fact variable-length.
2020-10-09 17:28:57 -04:00
Nick Mathewson b3a809b1e3 Move counts_towards_windows() code into circuit module 2020-10-09 15:07:12 -04:00
Nick Mathewson 800948c4cb Fix counting rules for circuit-level sendmes. 2020-10-09 11:27:27 -04:00
Nick Mathewson cf882d5a6d Logic error: negate test for sendme cells in counts_towards_windows 2020-10-09 10:11:23 -04:00
Nick Mathewson b0a53d4d40 Move RelayCell into a more reasonable place. 2020-09-29 08:43:13 -04:00
Nick Mathewson 98ab84e774 Rename remaining get_ accessors 2020-09-28 16:13:14 -04:00
Nick Mathewson 52016aa35b A few more unit tests for tor-cell 2020-09-28 11:01:59 -04:00
Nick Mathewson 397d753e4e Fix a few clippy issues 2020-09-27 03:30:09 -04:00
Nick Mathewson 2feb750ba1 fix fuzzing targets that broke from recent refactoring 2020-09-27 03:16:53 -04:00
Nick Mathewson 34fb048e25 Tests for relay cell encoding/decoding. 2020-09-27 02:17:37 -04:00
Nick Mathewson 4ea9bb6153 Tests for channel-cell codec 2020-09-27 01:37:28 -04:00
Nick Mathewson eba1d796fb Add tests for certs cell accessors 2020-09-27 00:46:52 -04:00
Nick Mathewson 13edb7b10e Test a few more channel cell types. 2020-09-27 00:35:26 -04:00
Nick Mathewson 096f0d499f test ipv6 connected cell 2020-09-27 00:09:42 -04:00
Nick Mathewson 31b8d95c2f Tests for Unrecognized and Data relay messages 2020-09-27 00:01:55 -04:00
Nick Mathewson 7096a6b774 Add tests for END_REASON_EXITPOLICY messages. 2020-09-26 23:44:57 -04:00
Nick Mathewson a0a3004a82 More tests for begin cells, plus fixes 2020-09-26 23:38:22 -04:00