aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/microdesc
Commit message (Collapse)AuthorAgeFilesLines
* Apply deferred rustfmt churnIan Jackson2026-06-221-4/+1
|
* tor-netdoc: Break Microdesc up into Microdesc and MicrodescAndHashIan Jackson2026-06-221-8/+11
| | | | | | | | | | | | | The Microdesc type having a copy of the document hash was always weird, and it's weirder now that there's all these parse2 types that don't have it and parse2 derives on Microdesc that don't touch it. Make a new type for the descriptor and its hash. Use deref to arrange that the new type works almost like the old one. Adjust the use lines in the dependencies to temporarily import MicrodescAndHash as Microdesc.
* tor-netdoc: Microdesc: derive ConstructorIan Jackson2026-06-221-0/+1
|
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* Upgrade rand crates to 0.10.Wesley Aptekar-Cassels2026-05-121-1/+1
| | | | | | | | | | | When the circ-padding feature is enabled, we use maybenot, which does not yet support rand 0.10. In the meantime, enabling this feature pulls in rand 0.9. This is not ideal, but should be okay as a temporary situation. This also replaces the use of ReseedingRng (which was removed in 0.10) with the reseeding_rng crate. This is somewhat less performant, but it should be okay.
* tor-netdoc: Use Curve25519Public for parsingClara Engler2026-04-021-1/+2
| | | | | | This commit removes the implementation of ItemArgumentParseable for curve25519::PublicKey in favor of using the already existing Curve25519Public, which also got beefed up slightly.
* tor-netdoc: Properly parse mutliple family-idsClara Engler2026-04-021-3/+3
| | | | | | | | | | | | | This commit fixes a bug in the microdescriptor parser to properly parse multiple family-ids. Previously, we interpreted the spec to simply contain multiple `family-ids` lines. This is wrong however. Instead, there may only be a single such line with multiple values. To fix this issues, we itnroduce a `RelayFamilyIds` type, similar to `RelayFamily`, that stores multiple `RelayFamilyId` entires in a `Vec`. Then, we just derive `ItemValueParseable` on it and win.
* tor-netdoc: Derive NetdocParseable for MicrodescClara Engler2026-04-021-1/+4
| | | | | | | | | | | | This makes it possible to parse2 micro descriptors, which will be very useful later on. For this, it makes a few changes. Most notably, it introduces a (private) field called `onion_key`, which stores an optional RSA onion key, as it serves as the introduction line for this netdoc document type. Besides, it also changes the `ed25519_id` type to the `Ed25519IdentityLine` wrapper type, although the signature of the respective getter remains the same.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* netdoc: Add "family-ids" line to microdesc parserNick Mathewson2025-02-121-1/+11
|
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-241-0/+1
|
* Canonicalize and intern family representations to save memory.Nick Mathewson2022-03-111-1/+1
| | | | | | This should save 1-3 MB of ram on each running arti client. Closes #384. See also tor#27359 and proposal 298.
* netdoc: Make doc-build errors a separate typeNick Mathewson2022-02-141-3/+3
| | | | | Every other case of tor_netdoc::Error means a parse failure. This one, though, means a failure to construct a document.
* Remove unused tap_onion_key and tap_keyNeel Chauhan2021-11-281-40/+3
|
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+250
This will cause some pain for now, but now is really the best time to do this kind of thing.