Commit Graph

86 Commits

Author SHA1 Message Date
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
Nick Mathewson 207a971cd2 add a spec conformance comment 2020-09-26 19:27:15 -04:00
Nick Mathewson fa2fd4bbfe Add tests for a few more relay message types 2020-09-26 19:22:18 -04:00
Nick Mathewson 3d5cd55669 Add test vectors for a few relay message types.
I generated these by running an instrumented version of Tor through
chutney.
2020-09-26 17:32:15 -04:00
Nick Mathewson cb57d00161 Use the correct value for TAP_C_HANDSHAKE_LEN 2020-09-26 17:31:01 -04:00
Nick Mathewson d74f5f11f5 tor-proto conformance: do not write zero-valued flags in begin cell. 2020-09-26 17:24:48 -04:00
Nick Mathewson d3e4ca0ecb tor-cell: Add some test vectors for channel messages 2020-09-26 16:23:57 -04:00
Nick Mathewson 220a3acad2 update fuzzing cfg for tor-cell crate 2020-09-26 12:52:59 -04:00
Nick Mathewson b710e5c770 Split the cell-handling parts of tor-proto into a new crate. 2020-09-26 12:49:03 -04:00