summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
* Version bumps for 2.5.0Nick Mathewson2026-06-301-14/+14
| | | | | | | | | | | | | Closes #2617. We've lucked out this time, and it turns out that every one of our published crates gets a minor bump. So this was generated with: ``` for cr in $(./maint/list-crates); do cargo set-version -p $cr --bump minor done ```
* tor-netdoc: Derive Eq on RouterDescSignaturesClara Engler2026-06-292-1/+2
|
* tor-netdoc: Derive Eq on RouterDescClara Engler2026-06-292-1/+2
|
* tor-netdoc: Derive Eq on (embedded) certificate typesClara Engler2026-06-293-2/+3
|
* tor-netdoc: Remove redundant .clone() callClara Engler2026-06-291-1/+1
| | | | No longer required because it implements Copy.
* tor-netdoc: Fix Ed25519NtorCrossCert rangeClara Engler2026-06-291-11/+4
| | | | | | | | | | This commit fixes the range to NOT include SystemTime::UNIX_EPOCH. This is because TimerangeBound makes a difference between a lower bound being Some or None. This was discovered later during test and is crucial to properly detect a minimum in the yet-to-be-merged .verify() method for router descriptors.
* Merge branch 'expanded-keypair-ntor' into 'main'Ian Jackson2026-06-292-3/+4
|\ | | | | | | | | tor-netdoc: ExpandedKeypair for Ed25519NtorCrossCert::new_signed() See merge request tpo/core/arti!4155
| * tor-netdoc: ExpandedKeypair for Ed25519NtorCrossCert::new_signed()Clara Engler2026-06-252-3/+4
| | | | | | | | | | | | | | This commit changes Ed25519NtorCrossCert::new_signed() to accept an ExpandedKeypair instead of a Keypair, because when converting the ntor key using convert_curve25519_to_ed25519_public(), only the ExpandedKeypair is returned, which is a one-way conversion from Keypair.
* | Merge branch 'microdesc-sha' into 'main'Clara Engler2026-06-253-48/+66
|\ \ | |/ |/| | | | | tor-netdoc: Remove document hash from Microdesc struct (and add MicrodescAndHash for that) See merge request tpo/core/arti!4138
| * Apply deferred rustfmt churnIan Jackson2026-06-222-9/+2
| |
| * tor-netdoc: Break Microdesc up into Microdesc and MicrodescAndHashIan Jackson2026-06-223-28/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Move some Microdesc methodsIan Jackson2026-06-221-20/+23
| | | | | | | | | | Code motion, plus adding a new impl block, to make the next commit clearer.
* | Merge branch 'trivial-encode-string-slice' into 'main'Clara Engler2026-06-251-2/+1
|\ \ | | | | | | | | | | | | tor-netdoc: Replace trivial string slice See merge request tpo/core/arti!4143
| * | tor-netdoc: Replace trivial string sliceClara Engler2026-06-241-2/+1
| | |
* | | tor-netdoc: Replace string slices with str::get() in doc (fmt)Clara Engler2026-06-243-5/+19
| | | | | | | | | | | | No functional change, just reformatting.
* | | tor-netdoc: Replace string slices with str::get() in docClara Engler2026-06-245-14/+9
|/ / | | | | | | | | | | | | | | | | | | | | | | This commit replaces the use of string slices with str::get() in all document related code. While this is not a perfect replacement for it, the relevant parts in the code heavily depend upon the byte offsets returned by the low level (legacy) parser where changing it would lead to a very big refactoring. Nonetheless, this approach is better because returning a bug is better than crashing.
* | tor-netdoc: Fix rs.rs cache commentsClara Engler2026-06-241-1/+1
| | | | | | | | Removes a blocking comment and replaces it with a TODO DIRAUTH.
* | tor-basic-utils: Add GloballyInternable::into_intern()Clara Engler2026-06-243-4/+4
| | | | | | | | As a shorthand for T::intern_cache().intern(value).
* | Add missing semver.md entriesClara Engler2026-06-241-0/+2
| |
* | tor-netdoc: Wrap port policies in InternClara Engler2026-06-244-12/+12
| | | | | | | | This commit wraps the port policies in an Intern.
* | tor-netdoc: Wrap family in InternClara Engler2026-06-244-10/+12
| | | | | | | | This commit wraps the relay family in an Intern instead of an Arc.
* | tor-netdoc: Implement encode traits for Intern wrappersClara Engler2026-06-241-0/+35
| | | | | | | | Just a boilerplate implementation.
* | tor-netdoc: Implement parse2 traits for Intern wrappersClara Engler2026-06-242-1/+18
| | | | | | | | | | This commit implements ItemValueParseable and ItemArgumentParseable for Intern<T> types. This should be sufficient for the time being.
* | tor-netdoc: GloballyInternable for PortPolicyClara Engler2026-06-241-10/+6
| |
* | tor-netdoc: GloballyInternable for RelayFamilyClara Engler2026-06-241-10/+5
| |
* | Use Intern<T> (fmt)Clara Engler2026-06-241-1/+3
| | | | | | | | No functional change.
* | Use Intern<T>Clara Engler2026-06-243-3/+6
| | | | | | | | | | This commit modifies the codebase to actually return Intern<T> in InternCache<T> and adds calls to .into() accordingly.
* | tor-netdoc: Blocking TODOs for dangerous callsClara Engler2026-06-231-0/+2
| |
* | tor-netdoc: Explain why .dangerously_assume_timely() is okClara Engler2026-06-231-0/+2
| |
* | tor-netdoc: Update semver.mdClara Engler2026-06-231-0/+1
| | | | | | | | | | This updates semver.md with the breaking changes done to the Ed25519 certificate verification methods.
* | tor-netdoc: Fix EdCert rustdoc numberingClara Engler2026-06-231-16/+14
| |
* | tor-netdoc: Use TimerangeBound for EdCert verify (fmt)Clara Engler2026-06-231-14/+14
| | | | | | | | No functional change.
* | tor-netdoc: Use TimerangeBound for EdCert verifyClara Engler2026-06-231-48/+26
| | | | | | | | | | | | | | This commit modifies the .verify() method for the Ed25519 embedded certificates to wrap the result in a TimerangeBound, which inevitably also changes the function signature in terms of arguments to no longer accept SystemTime/Duration arguments.
* | Merge branch 'addr-policy-fix' into 'main'Ian Jackson2026-06-233-68/+54
|\ \ | | | | | | | | | | | | | | | | | | tor-netdoc: addr policy: Overhaul and fix /0 bug Closes #2589 See merge request tpo/core/arti!4128
| * | tor-netdoc: addr policy: Rename variant from Star to AllIan Jackson2026-06-181-5/+5
| | | | | | | | | | | | | | | | | | IMO it makes more sense to describe the semantics, than the syntax. (This is a private type at the moment.)
| * | tor-netdoc: addr policy: Add tests for overlong prefixesIan Jackson2026-06-181-0/+5
| | | | | | | | | | | | | | | These are currently accepted. I'm not sure if we want to change that. For now, add a test case.
| * | tor-netdoc: addr policy: Use ipnet instead of open-coding it allIan Jackson2026-06-182-31/+18
| | | | | | | | | | | | | | | ipnet is a very widely used crate which is already in our dependency stack.
| * | tor-netdoc: addr policy: Fix /0 handling bugIan Jackson2026-06-181-16/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ADDR/0 is not the same as *, because it specifies the IP version. Turning 0.0.0.0/0 into * is wrong, because * accepts IPv6 too. Do this by abolishing the V4Star and V6Star variants. Sadly Rust thinks that u32 << 32 is an overflow, not zero, so we do still need a special case for a zero prefix length. (But we're about to delete this code.) Fixes #2589.
| * | tor-netdoc: addr policy tests: Add test case for IPv4 /0Ian Jackson2026-06-181-0/+1
| | | | | | | | | | | | This is, also, wrong.
| * | tor-netdoc: addr policy tests: Rename check/check1/check2Ian Jackson2026-06-181-11/+11
| | | | | | | | | | | | | | | We should privilege the "is the same" case. Rename check to check2 and check1 to check.
| * | tor-netdoc: addr policy tests: Avoid repeating where string isn't changedIan Jackson2026-06-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | This allows us to easily distinguish by eye, the cases where things changed (ie, where the input string was canonical), from the ones where they didn't. One of these cases is a bug.
| * | tor-netdoc: addr policy tests: Improve a few panic messagesIan Jackson2026-06-181-2/+2
| | |
| * | tor-netdoc: addr policy: Correct terminologyIan Jackson2026-06-182-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | A "mask" is a bitmask, eg 255.255.0.0 in 192.168.0.0/255.255.0.0. These are all prefix lengths. Using the word "mask" to refer to a prefix length is quite bad, because prefix lengths are numbers and sometimes masks are too. Using one as the other would be a bug.
* | | Merge branch 'rd-derive-parse' into 'main'Ian Jackson2026-06-232-2/+52
|\ \ \ | |_|/ |/| | | | | | | | Derive NetdocParseableUnverified for RouterDesc See merge request tpo/core/arti!4134
| * | tor-netdoc: Add TODOClara Engler2026-06-231-1/+1
| | |
| * | tor-netdoc: Replace assume_wellsigned() with unwrap_unverified()Clara Engler2026-06-231-10/+3
| | |
| * | tor-netdoc: Add small RouterDesc parse2 testClara Engler2026-06-221-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a very small RouterDesc parse2 test only verifying whether the testdata2 gets properly parsed, with a minimal length verification alongside two identity related fields. Once we have encoding and verification support, we have to extend this test of course.
| * | tor-netdoc: Add test only RouterDesc verifyClara Engler2026-06-221-1/+8
| | | | | | | | | | | | | | | Only for testing, just returns the inner body. Will be removed once we have a proper verify method.
| * | Derive NetdocParseableUnverified for RouterDescClara Engler2026-06-222-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finally! 🎉 This commit derives NetdocParseableUnverified for RouterDesc by adding the respective derive_deftly attributes to the top-level definition as well as the member fields that require it. A .verify() method as well as unit tests will be added in the next commits. Encoding still depends on a few tiny papercuts but will otherwise be added shortly too, although in a different branch.
* | | tor-netdoc: relay families: Add TODO re overhaul/removal of type(s)Ian Jackson2026-06-221-0/+7
| | |