aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | tor-netdoc: Add NtorOnionKeyCrossCertClara Engler2026-06-112-0/+31
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the NtorOnionKeyCrossCert data type; a data type implementing ItemValueParseable, intended for use within RouterDesc and parse2. This type wraps around the previously added Ed25519NtorCrossCert type in a fashion that honors the `bit` argument.
* | | | | | Merge branch 'recommended-versions' into 'main'Clara Engler2026-06-117-23/+152
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | tor-netdoc: sort out recommended software versions items See merge request tpo/core/arti!4059
| * | | | | tor-netdoc: Use iter_join for RecommendedTorVersionsIan Jackson2026-06-111-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4059#note_3424494
| * | | | | tor-netdoc: Fix a trailing whitespaceIan Jackson2026-06-111-1/+1
| | | | | |
| * | | | | tor-netdoc: Fix copypaste errorIan Jackson2026-06-111-1/+1
| | | | | |
| * | | | | tor-netdoc: recommended versions: fix parsing bug in old parserIan Jackson2026-06-111-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An existing real consensus says something like this: client-versions 0.4.8.19,0.4.8.20,0.4.8.21,0.4.8.22,0.4.8.23,0.4.8.24,0.4.8.25,0.4.9.4-rc,0.4.9.5,0.4.9.6,0.4.9.7,0.4.9.8 so it's not using the additional arguments, and the spec says those should be ignored. See also torspec!500.
| * | | | | tor-netdoc: recommended versions: new {client,server}-versions typeIan Jackson2026-06-114-12/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a single comma-separated argument, with absence of the item being the same as absence of the arguemnt. The previous code had `Vec<String>` which in parse2 would mean zero or more occurrences of the item, with one argument each. The old parser would split the whole RHS of the arguments. It still does right now - we'll fix that in a moment.
| * | | | | tor-netdoc: old consensus parser: add a bindingIan Jackson2026-06-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | This will make the next change here slightly less confusing.
| * | | | | tor-netdoc: old consensus parser: break out parse_rec_versions (fmt)Ian Jackson2026-06-111-8/+7
| | | | | |
| * | | | | tor-netdoc: old consensus parser: break out parse_rec_versionsIan Jackson2026-06-111-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | Again, this is going to get more complicated, so let's make a closure.
| * | | | | tor-netdoc: ConsensusBuilder: break out mk_versionsIan Jackson2026-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | This is going to get more complicated, so let's make a closure for it.
| * | | | | tor-netdoc: recommended versions: add spec linksIan Jackson2026-06-111-0/+4
| | | | | |
| * | | | | tor-netdoc: impl From<std::convert::Infallible> for ErrorIan Jackson2026-06-112-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This would let us use `.parse_arg::<String>()` in old parsing code. I wanted this for recommended versions, and then didn't use it, but it seems useful anyway.
| * | | | | tor-netdoc: Expose MaybeItem::pos pub(crate)Ian Jackson2026-06-111-1/+1
|/ / / / /
* | | | | Merge branch 'assert-eq-diff' into 'main'Clara Engler2026-06-116-24/+63
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-netdoc: Replace ad-hoc pseudo-diff with unidiff from imra See merge request tpo/core/arti!4096
| * | | | | tor-netdoc: Replace ad-hoc pseudo-diff with unidiff from imra (fmt)Ian Jackson2026-06-111-4/+1
| | | | | |
| * | | | | tor-netdoc: Use assert_eq_or_diff in three more placesIan Jackson2026-06-112-5/+3
| | | | | |
| * | | | | tor-netdoc: Replace ad-hoc pseudo-diff with unidiff from imraIan Jackson2026-06-114-16/+60
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | And wrap it up nicely in an assert_eq_or_diff macro. I've tested the output by sabotaging one of the test2 tests.
* | | | | Merge branch 'join' into 'main'Ian Jackson2026-06-115-10/+10
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Use tor_basic_utils::iter_join in a couple of places See merge request tpo/core/arti!4091
| * | | | | tor-guardmgr: Replace an Itertools::intersperse with joinIan Jackson2026-06-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | We're collecting a String here. Do that the easy way.
| * | | | | tor-netdoc: Replace an Itertools::intersperse with iter_joinIan Jackson2026-06-111-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is what iter_join is for.
| * | | | | tor-proto: Remove a now-redundant .iter() in a call to iter_joinIan Jackson2026-06-111-1/+1
| | | | | |
| * | | | | tor-basic-utils: iter_join: Take IntoIterator, not just IteratorIan Jackson2026-06-112-4/+5
| | | | | |
* | | | | | Merge branch 'rs-items' into 'main'Ian Jackson2026-06-117-2/+58
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | tor-netdoc: routerstatus: add missing fields See merge request tpo/core/arti!4061
| * | | | | | tor-netdoc: routerstatus: document additionsIan Jackson2026-06-111-0/+1
| | | | | | |
| * | | | | | tor-netdoc: routerstatus entries: Add `id` item (votes only)Ian Jackson2026-06-114-0/+13
| | | | | | |
| * | | | | | tor-netdoc: impl ItemValueEncodable for Ed25519IdentityLineIan Jackson2026-06-111-1/+1
| | | | | | |
| * | | | | | tor-netdoc: Ed25519IdentityLine: Improve docsIan Jackson2026-06-111-1/+8
| | | | | | |
| * | | | | | tor-netdoc: routerstatus entries: Add note about location of `m` itemIan Jackson2026-06-111-0/+3
| | | | | | |
| * | | | | | tor-netdoc: routerstatus entries: Add `p` itemIan Jackson2026-06-115-0/+20
| | | | | | |
| * | | | | | tor-netdoc: routerstatus: r item: add dir-port argumentIan Jackson2026-06-113-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This was simply missing.
| * | | | | | tor-netdoc: routerstatus: r item: add blank lines to structIan Jackson2026-06-111-0/+5
| |/ / / / /
* | | | | | Merge branch 'rd-item-present' into 'main'Clara Engler2026-06-112-4/+33
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | Utilize ItemPresent in RouterDesc See merge request tpo/core/arti!4080
| * | | | | tor-netdoc: Add RouterDesc::hidden_serive_dirClara Engler2026-06-112-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds RouterDesc::hidden_service_dir as well as an accompanying ZST token.
| * | | | | tor-netdoc: Replace bool with ItemPresent in RouterDesc (fmt)Clara Engler2026-06-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | | tor-netdoc: Replace bool with ItemPresent in RouterDescClara Engler2026-06-112-4/+18
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies RouterDesc to replace all occurrences of `bool` with `Option<ItemPresent<T>>` while adding respective ZST tokens for the respective items. In this case, it adjusts caches_extra_info and tunnelled_dir_server.
* | | | | Merge branch 'ntor-crosscert' into 'main'Clara Engler2026-06-114-40/+279
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Add Ed25519NtorCrossCert See merge request tpo/core/arti!4022
| * | | | | tor-netdoc: Specify requires_signed_with_ext in ed25519_cert_invalidClara Engler2026-06-111-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds an argument to the generic test specifying whether the type requires the respective extension or not, in order to replace a clumsy std::any solution.
| * | | | | tor-netdoc: Add TODO for merging generic test functionsClara Engler2026-06-111-0/+2
| | | | | |
| * | | | | tor-netdoc: Actually call ed25519_cert_invalid for Ed25519NtorCrossCertClara Engler2026-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Accidentially made a mistake here, will merge them into a single test as a follow-up.
| * | | | | tor-netdoc: Remove "both keys must be different" testClara Engler2026-06-111-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will not need it for Ed25519NtorCrossCert so let's remove it, as discussed in IRC.
| * | | | | tor-netdoc: Remove #[allow(unused)]Clara Engler2026-06-111-1/+0
| | | | | |
| * | | | | tor-netdoc: Use .verify_inner() in .verify()Clara Engler2026-06-111-42/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the old .verify() method and replaces it with .verify_inner() plus the logic to actually verify the signatures and expiration dates using tor-checkable. The verification logic is purposely different as the new one was taken from the legacy one.
| * | | | | tor-netdoc: Use .verify_inner() in legacy parserClara Engler2026-06-111-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the legacy parser to make use of the just added .verify_inner() method. For this, we replace the part that extracts crosscert_cert to only extract the inner signature and expiry timestamp, because this is what will be used ultimately. Inside this extraction, we change the parser to only obtain the KeyUnknownCert without any further checks, after which we will pass it to .verify_inner() to store the signatures and expiry date. Following this change, we now only change the places where the previous crosscert_cert was used to extract signatures and expiration dates to use the just extracted cc_sig and cc_expiry instead.
| * | | | | tor-netdoc: Ed25519NtorCrossCert::verify_inner()Clara Engler2026-06-112-1/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit creates a new method, Ed25519NtorCrossCert::verify_inner(), which in essence represents a copying of the verification logic for ntor cross certificates from the legacy parser into parse2 logic, with the eventual goal to unify these two. Unfortunately, a 1:1 move using --color-moved was not possible, because the legacy parser uses edcert::UnvalidatedEdCert for this, which is a very legacy parser specific type, as it contains a Pos in its inner items. Instead, I encourage reviewers to review the functional equality between these two implementations using the following approach: 1. Open the .verify_inner() in one pane. 2. Open routerdesc.rs below the position where this commit introduces the "XXX" comment in another pane next to it; this is the lion's share of the legacy implementation of it. 3. Ensure that the properties that the legacy implementation achieves is also achieved by .verify_inner(). This may require you to take a look at UnvalidatedEdCert::check_cert_type() and similar methods and verify that the if statements in .verify_inner() are equivalent. As outlined above, we cannot make use of these methods directly ourselves inside .verify_inner(). Keep in mind that the legacy parser only returns a tor_cert::UncheckedCert, whereas .verify_inner() returns a gated type. This is okay because UncheckedCert contains these gated types inside it anyways.
| * | | | | tor-netdoc: Documentation improvements for Ed25519NtorCrossCertClara Engler2026-06-111-4/+6
| | | | | | | | | | | | | | | | | | Co-authored-by: Ian Jackson
| * | | | | tor-netdoc: Add test for Ed25519NtorCrossCertClara Engler2026-06-111-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the tests for Ed25519NtorCrossCert by implementing Ed25519CertTest for it and executing the respective generic test functions for it.
| * | | | | tor-netdoc: Dynamically add signed-with violationClara Engler2026-06-111-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the invalid ed25519 cert unit test violation of a missing signed-with extension if the generic type is not Ed25519NtorCrossCertificate, as this type does not use this extension. Instead, we change the test vector to a `mut Vec<_>` and push the missing signed-with test if the generic parameter IS NOT of type Ed25519NtorCrossCert.
| * | | | | tor-netdoc: Switch invalid CertType in unit testClara Engler2026-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switches the invalid/out-of-place CertType away from ntor cross-cert because we will add a test for this soon. Instead, we now just an RSA certificate, should not collide with any edcert.
| * | | | | tor-netdoc: Provide signing key in Ed25519CertTestClara Engler2026-06-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit extends .verify() and .new_signed() in Ed25519CertTest to accept the signing key next to the certified key in order to also support Ed25519 certificates not containing the signed-with extension, such as ntor certificates.