summaryrefslogtreecommitdiff
path: root/crates/tor-cell/tests
Commit message (Collapse)AuthorAgeFilesLines
* tor-cell: udp: Remove manual length calculationsIan Jackson2022-06-091-3/+3
| | | | | This does away entirely with `wire_addr_len`, which recapitulates the length calculation.
* Merge branch 'use-testing-rng'Nick Mathewson2022-06-071-1/+2
|\
| * Use testing_rng() in tests throughout our crates.Nick Mathewson2022-06-021-1/+2
| | | | | | | | | | | | This only affects uses of thread_rng(), and affects them all more or less indiscriminately. One test does not work with ARTI_TEST_PRNG=deterministic; the next commit will fix it.
* | udp: New AddressPort used in cellsDavid Goulet2022-06-071-14/+12
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | udp: Allow empty hostname and no nul byteIan Jackson2022-06-072-23/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After changes to the prop339, the domain name in an Address can only be 255 bytes max and can NOT contain nul byte(s). Unit tests had to be modified to accept this change: - Centralise msg_ip_address - Add currently-passing tests for address length - Test counted address length longer than type wants Related to #463 Signed-off-by: David Goulet <[email protected]>
* | cell: Don't use NUL terminated string in CONNECT_UDPDavid Goulet2022-06-072-27/+25
| | | | | | | | Signed-off-by: David Goulet <[email protected]>
* | cell: Move UDP to its own module and feature gate itDavid Goulet2022-06-072-10/+20
| | | | | | | | | | | | Related to #463 Signed-off-by: David Goulet <[email protected]>
* | cell: Implement CONNECTED_UDP cell from prop339David Goulet2022-06-071-0/+51
| | | | | | | | | | | | Decoding and encoding implemented according to proposal 339. Related to #463
* | cell: Implement CONNECT_UDP cell from prop339David Goulet2022-06-072-1/+119
|/ | | | | | | | | Decoding and encoding is implemented according to proposal 339 specifications. Related to #463 Signed-off-by: David Goulet <[email protected]>
* Remove many needless borrows and slicesIan Jackson2022-02-021-1/+1
| | | | | | | Found via clippy::needless_borrow. In some cases I removed needless `[..]` too. See also: needless_borrow suggestion doesn't go far enough https://github.com/rust-lang/rust-clippy/issues/8389
* fix/silence clippy lints in test modulesDaniel Eades2021-09-082-2/+2
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-274-0/+1180
This will cause some pain for now, but now is really the best time to do this kind of thing.