aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | tor-netdoc: ns verification: Allow "dry run" to just get missing certs infoIan Jackson2026-06-112-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | No functional change with the existing caller.
| * | | | | tor-netdoc: ns verification: Collect missing certs/sigs informationIan Jackson2026-06-111-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce ConsensusVerifiabilityError. No functional change with the existing callere, which discards the error value.
| * | | | | tor-netdoc: ns verification: verify_general, return Result, tidy callerIan Jackson2026-06-111-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the caller can use .map_err rather than if .ok(). No functional change.
| * | | | | tor-netdoc: ns verification: verify_general, return ResultIan Jackson2026-06-113-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | | tor-netdoc: ns verification: abolish SigCheckResultIan Jackson2026-06-111-27/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the body of check_signature into verify_general. check_signature was the only thing that returned SigCheckResult. No functional change.
| * | | | | tor-netdoc: ns verification: Introduce ConsensusSignatureToVerifyIan Jackson2026-06-111-9/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And split check_signature into signature_to_verify which obtains a ConsensusSignatureToVerify, and then a call to .verify(). The return values are still a bit janky. No functional change.
| * | | | | tor-netdoc: poc: Abolish core of separate verification logicIan Jackson2026-06-111-50/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In an attempt to check that the new verification code makes sense, we compare it with the freshly rewritten one in poc. To review this, compare the code being deleted with the body of verify_general (doc/netstatus.rs, line 2164 et seq). You'll also want to refer to the body of find_cert and check_signature (lines 2068-2086).
| * | | | | tor-netdoc: poc: Skip duplicate signatures earlier.Ian Jackson2026-06-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like verify_general does. (This wasn't a bug before, because we could the length of ok, so all that would happen is we'd do some extra work.)
| * | | | | tor-netdoc: poc: Reorder slightlyIan Jackson2026-06-111-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obtain the hash first, like verify_general does. No significant functional change, and this is poc code anyway.
| * | | | | tor-netdoc: poc: Use let else continue (fmt)Ian Jackson2026-06-111-18/+18
| | | | | |
| * | | | | tor-netdoc: poc: Use let else continueIan Jackson2026-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the code more like that in verify_general. No functional change, and this is poc code anyway.
| * | | | | tor-netdoc: ns verification: verify_general, remove an otiose typecheckIan Jackson2026-06-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this was arguably needed for clarity. With the new hash finding arrangements, much less so. No functional change.
| * | | | | tor-netdoc: ns verification: verify_general, disassemble SignatureIan Jackson2026-06-111-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use an exhaustive pattern. This allows us to spot any fields which we omit to look at, which would be an indication of a possible bug. No functional change.
| * | | | | tor-netdoc: ns verification: verify_general, add trusted_auth's argumentIan Jackson2026-06-111-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | No functional change with the current caller.
| * | | | | tor-netdoc: ns verification: Use the proper hash fieldIan Jackson2026-06-111-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does not fix the bug with the old parser. The old parser always uses the `sha1` field in `hashes` even when `sha1_unnamed` would be right. But it also always sets `sha1`. Or to put it another way, because the old parser parses an unspecified algorithm as if it were explicitly `sha1`, it then both sets the digest_algo to DigestAlgoInSignature(Some(...)), and writes the hash to the `sha1` field. So this does not have an overall functional change with the old parser, and nothing else calls this. I'm fixing this here, now, so that the new parser doesn't inherit the bug. The new parser will set `digest_algo` correctly, and correctly write the hash to `sha1` or `sha1_unnamed`. What a terrible protocol this is.
| * | | | | tor-netdoc: ns verification: Use let else to avoid an unwrapIan Jackson2026-06-111-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | No functional change.
| * | | | | tor-netdoc: ns verification: Break out SignatureGroup::verify_generalIan Jackson2026-06-111-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is going to be the entrypoint for sharing verification code with parse2. For now it must be pub(crate) since we're going to call it from poc. No functional change.
* | | | | | Merge branch 'rd-ntor-crosscert' into 'main'Clara Engler2026-06-112-1/+102
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add NtorOnionKeyCrossCert See merge request tpo/core/arti!4023
| * | | | | | tor-netdoc: Test NtorOnionKeyCrossCert typeClara Engler2026-06-111-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a unit test for NtorOnionKeyCrossCert that tests whether it can be successfully decoded and verified if enough fields are given. The test itself is performed on keys with a negative as well as keys with a positive sign as the argument.
| * | | | | | 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.