aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-netdoc: authcert tests: insist on return value typeIan Jackson2026-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | We're about to make UnverifiedAuthCert::verify return a TimerangeBound, not an AuthCert. For the success cases, declare the expected return type.
* | | Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-1037-0/+57
|\ \ \ | | | | | | | | | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086
| * | | everywhere: Add #[allow(clippy::string_slice)]Clara Engler2026-06-0913-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds #[allow(clippy::string_slice)] to all functions in the code where string slices are used, alongside a TODO comment. We do this add the function header to have it consistent, as things like expression based allow's are still experimental.
| * | | maint: Run maint/add_warning to deny string slicesClara Engler2026-06-0932-0/+33
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | tor-netdoc: Fix a doc comment formatting botchIan Jackson2026-06-091-1/+1
| | |
* | | tor-netdoc: Introduce toplevel NeteworkStatus typeIan Jackson2026-06-095-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All of the pieces are in place for this now. Some of the pieces are not entirely complete or correct at this point: that's sorted out by other MRs already open. Currently there is no encoding, no verification functdion, and no tests. Encoding depends on another oustanding MR (arti!4058). Verification depends on the rework in arti!4065. Tests are still to come.
* | | Merge branch 'fuzz-parse2' into 'main'Nick Mathewson2026-06-092-2/+10
|\ \ \ | | | | | | | | | | | | | | | | netdoc: Add fuzzing support for parse2 with authcert, mds See merge request tpo/core/arti!4068
| * | | netdoc: Add fuzzing support for parse2 with authcert, mdsNick Mathewson2026-06-042-2/+10
| | | |
* | | | Merge branch 'deftly' into 'main'Nick Mathewson2026-06-091-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Bump derive-deftly to 1.11.3 to get $impl See merge request tpo/core/arti!4083
| * | | | Bump derive-deftly to 1.11.3Ian Jackson2026-06-091-1/+1
| | |/ / | |/| | | | | | | | | | New beta semver policy means we should pin the patchlevel.
* | | | tor-netdoc: F64Finite, initially for votes' stats itemsIan Jackson2026-06-093-0/+135
| | | | | | | | | | | | | | | | | | | | The actual item field isn't in the struct yet, because that would produce conflicts with other outstanding work in this same struct.
* | | | tor-netdoc: document new encoding implsIan Jackson2026-06-091-0/+2
| | | |
* | | | tor-netdoc: impl EncodeOrd for SignatureIan Jackson2026-06-091-1/+8
| | | | | | | | | | | | | | | | This will let us encode consensus signatures sections.
* | | | tor-netdoc: impl EncodeOrd for RouterStatusIan Jackson2026-06-092-1/+10
| | | | | | | | | | | | | | | | This defines ordering of routerstatus items.
* | | | tor-netdoc: derive encoding for RouterStatusIan Jackson2026-06-092-1/+1
| | | |
* | | | tor-netdoc: derive encoding for RouterStatusIntroItemIan Jackson2026-06-091-0/+1
|/ / / | | | | | | | | | | | | | | | This is a nontrivial type with much weirdness to do with publication times etc., so let's mark this as incomplete until we have a round trip test.
* | | tor-netdoc: Reject Object again in ItemPresentClara Engler2026-06-091-3/+4
| | | | | | | | | | | | We must reject unknown objects unless noted otherwise.
* | | tor-netdoc: Allow args and object in ItemPresent (fmt)Clara Engler2026-06-091-8/+2
| | | | | | | | | | | | No functional change.
* | | tor-netdoc: Allow args and object in ItemPresentClara Engler2026-06-091-8/+7
| | | | | | | | | | | | | | | Changes ItemPresent to accept but ignore additional arguments and/or an object.
* | | tor-netdoc: Small ItemPresent test fixClara Engler2026-06-091-1/+1
| | | | | | | | | | | | Adds the actual keyword for a present object to the test.
* | | tor-netdoc: Test for ItemPresentClara Engler2026-06-091-1/+89
| | | | | | | | | | | | | | | This commit adds a test for ItemPresent in terms of encoding and decoding.
* | | tor-netdoc: Add ItemPresent typeClara Engler2026-06-093-2/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the ItemPresent type, which is intended for token types where the mere presence implies a truthful value, such as `tunnelled-dir-server`. For now, it lives in `ignored_impls` because it does in fact ignore (actually rejects) everything around the item except the keyword. The type implements ItemValueParseable and ItemValueEncodable; both implementations being very minimal and only parsing/emitting the keyword. A test will be added within the next commit.
* | | tor-netdoc: Document Transparent shortcomingClara Engler2026-06-091-0/+3
| | | | | | | | | | | | | | | | | | | | | This commit documents a shortcoming explained on IRC that exists with the current derive(Transparent) and generic types that are uncovered. See E0210.
* | | Merge branch 'netdoc-small-fixes' into 'main'Clara Engler2026-06-093-4/+5
|\ \ \ | | | | | | | | | | | | | | | | tor-netdoc: minor fixes arising from netstatus work See merge request tpo/core/arti!4055
| * | | tor-netdoc: {required,recommended}-*-protocols: change orderingIan Jackson2026-06-031-2/+2
| | | | | | | | | | | | | | | | This matches C Tor and the spec.
| * | | tor-netdoc: {required,recommended}-*-protocols: fix encodingIan Jackson2026-06-031-1/+1
| | | | | | | | | | | | | | | | We need to use `-`, not `_`. So use concat! stringify!.
| * | | tor-netdoc: SoftwareVersion: fix Display implIan Jackson2026-06-031-0/+1
| | | | | | | | | | | | | | | | Now it round-trips.
| * | | tor-netdoc: fix a doc formatting typoIan Jackson2026-06-031-1/+1
| | |/ | |/|
* | | Merge branch 'parse-input-improve' into 'main'Clara Engler2026-06-092-0/+17
|\ \ \ | |_|/ |/| | | | | | | | tor-netdoc: ParseInput: improve See merge request tpo/core/arti!4057
| * | tor-netdoc: ParseInput: document changesIan Jackson2026-06-031-0/+1
| | |
| * | tor-netdoc: ParseInput: add retain_unknown_values convenience setterIan Jackson2026-06-031-0/+10
| | |
| * | tor-netdoc: ParseInput: add accessorsIan Jackson2026-06-031-1/+4
| | |
| * | tor-netdoc: ParseInput: add some blank linesIan Jackson2026-06-031-0/+2
| | | | | | | | | | | | | | | This makes the code clearer, especially since we're going to add attributes.
| * | tor-netdoc: ParseInput: impl Debug and CloneIan Jackson2026-06-031-0/+1
| |/
* | Merge branch 'portpolicy-split-ws' into 'main'Clara Engler2026-06-033-11/+22
|\ \ | | | | | | | | | | | | tor-netdoc: Avoid use of string slices in PortPolicy See merge request tpo/core/arti!4062
| * | tor-netdoc: Test for UTF-8 port policy edge case52252252026-06-033-0/+17
| | | | | | | | | | | | | | | | | | | | | This commit adds a tor-netdoc test for checking for an edge case related to UTF-8 symbols found within netdocs. See arti#2566
| * | tor-netdoc: Avoid use of string slices in PortPolicyClara Engler2026-06-031-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the use of string slices in PortPolicy::from_str() by making use of `str::split_once` instead. See arti#2566 Co-authored-by: 5225225 <[email protected]>
* | | Merge branch 'no-result' into 'main'Clara Engler2026-06-033-38/+37
|\ \ \ | |_|/ |/| | | | | | | | tor-netdoc: No longer import crate::Result in doc::netstatus See merge request tpo/core/arti!4050
| * | tor-netdoc: netstatus: Abolish StdResult aliasIan Jackson2026-06-022-13/+12
| | |
| * | tor-netdoc: netstatus: No longer use crate::ResultIan Jackson2026-06-022-24/+24
| | |
| * | tor-netdoc: Change one call to use try_collect()Ian Jackson2026-06-021-1/+1
| | | | | | | | | | | | This is a clearer.
* | | Merge branch 'bump-deps' into 'main'Alexander Hansen Færøy2026-06-031-1/+1
|\ \ \ | |_|/ |/| | | | | | | | Bump some deps that have had breaking changes See merge request tpo/core/arti!4053
| * | dirserver,netdoc: Upgrade to the latest saturating-timeGabriela Moldovan2026-06-031-1/+1
| | |
* | | tor-netdoc: Add TODO for eventdnsClara Engler2026-06-031-0/+1
| | |
* | | tor-netdoc: Change Option<NumericBoolean> to NumericBooleanClara Engler2026-06-031-1/+2
| | | | | | | | | | | | | | | | | | It is weird to have three possible states for truthiness here. This commit removes the Option in favor of the inner type while adding a TODO comment to somehow find a way to skip this during encoding.
* | | tor-netdoc: Replace some item docs with spec linksClara Engler2026-06-031-6/+3
| | |
* | | tor-netdoc: Add TODO for overload_generalClara Engler2026-06-031-0/+1
| | | | | | | | | | | | Adds a TODO for using ConstantString for overload_general.
* | | tor-netdoc: Add extra_info_digest to RouterDescClara Engler2026-06-032-0/+9
| | | | | | | | | | | | This field is taken from the spec.
* | | tor-netdoc: Add contact to RouterDescClara Engler2026-06-032-0/+9
| | | | | | | | | | | | This commit adds the contact field to RouterDesc.
* | | tor-netdoc: Add overload_general to RouterDescClara Engler2026-06-032-0/+9
| | | | | | | | | | | | This commit adds support for the overload-general field to RouterDesc.