aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | tor-netdoc: Add Ed25519NtorCrossCertClara Engler2026-06-113-2/+123
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the Ed25519NtorCrossCert type for use with EmbeddedCert. So far, this certificate may not be used directly tet, because of the non-trivial X25519 -> Ed25519 conversion which is explained in a doc comment. The next commits will add more parse2-like types for actually parsing it, by honoring the `bit` found in `ntor-onion-key-crosscert` items. A unit test will be added in the immediate next commit.
* | | | | Merge branch 'validity-time-range' into 'main'Clara Engler2026-06-113-6/+16
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | tor-netdoc: ns preamble: break out validity_time_range See merge request tpo/core/arti!4054
| * | | | tor-netdoc: netstatus preamble: use saturating sub for starting_timeIan Jackson2026-06-102-1/+2
| | | | |
| * | | | tor-netdoc: ns preamble: break out validity_time_range (tidy)Ian Jackson2026-06-031-5/+3
| | | | | | | | | | | | | | | | | | | | Remove the otiose `preamble` and `timebound_range` bindings again.
| * | | | tor-netdoc: ns preamble: break out validity_time_rangeIan Jackson2026-06-033-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are going to want to use this when we implement verification for network statuses from parse2. Review with --color-moved.
| * | | | tor-netdoc: ns preamble: break out validity_time_range (prep)Ian Jackson2026-06-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Introduce and use bindings `preamble` and `timebound_range` that will make the next change easier to review.
* | | | | Merge branch 'inclusive-timerange' into 'main'Ian Jackson2026-06-115-7/+15
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Make all Timebound implementation inclusive See merge request tpo/core/arti!4094
| * | | | | tor-checkable: Specify Timebound inclusiveness in rustdocClara Engler2026-06-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit updates Timebound's rustdoc to require inclusiveness when checking the timeliness of a given object.
| * | | | | tor-cert: Document expiry inclusiveness for Ed25519CertClara Engler2026-06-111-0/+2
| | | | | |
| * | | | | tor-cert: Make Ed25519Cert time bound inclusiveClara Engler2026-06-111-1/+1
| | | | | |
| * | | | | tor-cert: Replace duration_since with saturation (fmt)Clara Engler2026-06-111-4/+2
| | | | | |
| * | | | | tor-cert: Replace duration_since with saturationClara Engler2026-06-113-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces a call to .duration_since(...).expect() with .saturating_duration_since() for defensive programming. We will change code related to it in the next commit.
| * | | | | tor-netdoc: Fix ed25519_invalid_cert unit testClara Engler2026-06-111-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the ed25519_invalid_cert unit test to not use `now` as the expiration date when generating a certificate in order to test the failed verification of it. The reason for this is that we want to change the verification function to be *inclusive* of the expiry date. If we were to use `now` as the expiry date while also being at `now`, we would no longer get an error. We will do the actual change in the next commits.
* | | | | Merge branch 'cgo-stable' into 'main'Nick Mathewson2026-06-103-6/+6
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | Mark "counter-galois-onion" as stable Closes #2550 See merge request tpo/core/arti!4069
| * | | | Mark "counter-galois-onion" as stableNick Mathewson2026-06-043-6/+6
| | | | |
* | | | | Merge branch 'fix-eventdns-todo' into 'main'Ian Jackson2026-06-101-1/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-netdoc: Remove accidential TODO left-over See merge request tpo/core/arti!4081
| * | | | | tor-netdoc: Remove accidential TODO left-overClara Engler2026-06-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes an accidential TODO left-over related to eventdns, which now appears as it would refer to caches-extra-info. I must have forgotten to rebase this out after we decided to not include eventdns in arti!4006, but looking at torspec!498, it is obvious that the comment refers to eventdns and not caches-extra-info.
* | | | | | Merge branch 'bump-docker-imgs' into 'main'Ian Jackson2026-06-102-3/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI: Bump docker images See merge request tpo/core/arti!4078
| * | | | | | CI: Update RECENT_RUST_IMAGE to 1.96Gabriela Moldovan2026-06-081-1/+1
| | | | | | |
| * | | | | | CI: Bump build-repro docker images to rust 1.96Gabriela Moldovan2026-06-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of #2559
* | | | | | | Merge branch 'dep' into 'main'Ian Jackson2026-06-102-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the "dep:" prefix to rpc-related dependencies in Cargo.toml See merge request tpo/core/arti!4090
| * | | | | | | arti: add "dep:" prefix to 'rpc' feature dependenciesSteven Engler2026-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is technically a breaking change since it removes the tor-rpc-connect, tor-rpcbase, and arti-rpcserver features from arti. But I think these implicit features should not be expected to be stable.
| * | | | | | | arti-client: add "dep:" prefix to "tor-rpcbase"Steven Engler2026-06-101-1/+1
|/ / / / / / /
* | | | | | | Merge branch 'authcert-timebound' into 'main'Ian Jackson2026-06-1014-156/+224
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | make TimerangeBound:is_valid treat bounds as inclusive; use it for parse2's AuthCert See merge request tpo/core/arti!4070
| * | | | | | tor-netcoc: NetdocParseableUnverified derive: forbid NetdocParseableIan Jackson2026-06-102-0/+12
| | | | | | |
| * | | | | | assert_not_impl: Support genericsIan Jackson2026-06-101-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want to call this in one of tor-netdoc's parse2 derives, which *do* support generics.
| * | | | | | assert_not_impl: Support generics - prepIan Jackson2026-06-101-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we move this let into the item impl, it will have access to the generics we're about to add to the `impl $rule`.
| * | | | | | assert_not_impl: Formally document input syntaxIan Jackson2026-06-101-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we were relying on the macro_rules pattern being in the rustdoc. But it's about to get more complex. Document it manually.
| * | | | | | assert_not_impl: Regularise example syntaxIan Jackson2026-06-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually Rust doesn't put a space after `:` in trait bounds. But it does when calling a macro with { } syntax.
| * | | | | | assert_not_impl: Fix a mendacious headingIan Jackson2026-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bit of the doc contains both succeeding and failing examples, each marked with an appropriate comment.
| * | | | | | assert_not_impl: Promote to tor-basic-utilsIan Jackson2026-06-104-42/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want this in tor-netdoc (which doesn't use tor-config and probably shouldn't). Almost entirely code motion. Review with --color-moved.
| * | | | | | assert_not_impl: Change example to use CellIan Jackson2026-06-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I want to mvoe this to tor-basic-utils, so it can't use tor-config in its example. Also, Cell is just a nicer example. (The rule identifier was already wrong.)
| * | | | | | assert_not_impl: Introduce some `use`sIan Jackson2026-06-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IMO this makes the example clearer. It will also make moving this macro to tor-basic-utils less noisy.
| * | | | | | tor-netdoc: parse2: Add more docs about verificationIan Jackson2026-06-101-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4070#note_3422636
| * | | | | | tor-netdoc: parse2: use TimeRangebound in exampleIan Jackson2026-06-101-3/+6
| | | | | | |
| * | | | | | tor-netdoc: parse2: Deprecate check_validity_timeIan Jackson2026-06-104-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4070#note_3422637 We must allow it in poc, but poc is a thing we're trying to abolish/replace, so that's OK.
| * | | | | | tor-checkable: TimerangeBound: test edge casesIan Jackson2026-06-101-0/+10
| | | | | | |
| * | | | | | tor-checkable: TimeRangebound: document inclusivityIan Jackson2026-06-101-1/+2
| | | | | | |
| * | | | | | tor-netdoc: authcert: use TimerangeBound for UnverifiedAuthCert::verify (fmt)Ian Jackson2026-06-102-102/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Precisely the result of rustfmt.
| * | | | | | tor-netdoc: authcert: use TimerangeBound for UnverifiedAuthCert::verifyIan Jackson2026-06-103-39/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TimerangeBound is reasonably nice and this will fit in better when we want to verify votes. Adjust the one non-test call site (in tor-dirserver) using .and_then. In the tests: * Where we expected success, call .check_valid_at and add another .unwrap(). * Where we expected signature verification failure, delete the time parameters. * Where we expected timeliness failure, call .check_valid_at and map the error. * With nontrivial tolerance, add calls to `extend_[pre_]tolerance`.
| * | | | | | tor-netdoc: authcert tests: add some parenthesesIan Jackson2026-06-101-4/+4
| | | | | | |
| * | | | | | 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.
| * | | | | | tor-dirserver: Promote tor-checkable depIan Jackson2026-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to need to talk about Timebound in the non-test code.
| * | | | | | tor-checkable: TimerangeBound: is_valid: Treat bounds as inclusive (fmt)Ian Jackson2026-06-101-2/+6
| | | | | | |
| * | | | | | tor-checkable: TimerangeBound: is_valid: Treat bounds as inclusiveIan Jackson2026-06-101-2/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes more sense because: * `start_bound` and `end_bound` return `Bound::Included` * It doesn't make sense to say that a document isn't valid at the very start of its validity period. (And we don't want a half-open range.) * NotYetValid(0ns) and Expired(0ns) are rather nonsensical errors. In real timeliness tests it will make no difference since the current time is only equal to the bound for a nanosecond. But tests that like to test corner cases might be affected, and possibly some synthetic situations (where the document's own validity time start is used somehow) might change.
* | | | | | Merge branch 'clippy-string-slice' into 'main'Nick Mathewson2026-06-10386-0/+457
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lint for clippy::string_slice See merge request tpo/core/arti!4086
| * | | | | | everywhere: Add #[allow(clippy::string_slice)]Clara Engler2026-06-0926-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-09379-0/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | maint: Deny/Allow clippy::string_sliceClara Engler2026-06-091-0/+2
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit denies clippy::string_slice but allows it for tests in maint/add_warning. The script will be executed in the next commit.
* | | | | | Merge branch 'cc-default' into 'main'Nick Mathewson2026-06-102-1/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'flowctl-cc' to 'default' See merge request tpo/core/arti!4042