| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
tor-netdoc: Remove document hash from Microdesc struct (and add MicrodescAndHash for that)
See merge request tpo/core/arti!4138
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Code motion, plus adding a new impl block, to make the next commit
clearer.
|
| | |
| |
| |
| | |
No functional change, just reformatting.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
Removes a blocking comment and replaces it with a TODO DIRAUTH.
|
| | |
| |
| |
| | |
This commit wraps the port policies in an Intern.
|
| | |
| |
| |
| | |
This commit wraps the relay family in an Intern instead of an Arc.
|
| | |
| |
| |
| | |
No functional change.
|
| | |
| |
| |
| |
| | |
This commit modifies the codebase to actually return Intern<T> in
InternCache<T> and adds calls to .into() accordingly.
|
| |\ \
| |/
|/|
| |
| | |
Derive NetdocParseableUnverified for RouterDesc
See merge request tpo/core/arti!4134
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Only for testing, just returns the inner body. Will be removed once we
have a proper verify method.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| |
| | |
We don't need the type to be private. Indeed, we'd like it not to be
to make Microdesc construction with Constructor regular
|
| | |
| |
| |
| |
| | |
"OnionKeyIntro" is particularly odd. Mostly people won't need to
refer to this, anyway.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
All these types already have parsing derives.
The encoding isn't quite right yet. It's legal, but doesn't match C
Tor as well as we'd like.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use roundtrip_netstatus, which does nearly all of the work for us.
But for it to round-trip, we must do a bunch of fudging.
This replaces the old parse2 vote test case (which used the poc type).
The test case has some adjustments to cope with missing fields. Move
the TODOs for those fields to the test case, so that they're on lines
that will be deleted when the fields are implemented.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Right now we're working on votes, but the same issue arises in
consensuses; we just haven't noticed yet because the testdata2
consensus doesn't have an SRV.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
In the future (not quite yet in this branch), there will be tests that
want to use roundtrip_netstatus for other test files.
We'll want to be able to reuse the per-document-specific munging. So
make that into a trait. And document roundtrip_netstatus.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
The vote test files are for the next consensus interval, so we need to
verify them at a slightly future time.
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| |
| |
| | |
Implement encoding and verification for consensuses, and add a round trip test
See merge request tpo/core/arti!4100
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Microdescriptor consensuses are affected by this same anomaly.
|
| | |
| |
| |
| | |
This will let us test microdescriptors and votes with the same code.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This avoids rebinding file and text and input to the authcerts.
We're going to want to use at least some of those values later.
|
| | | |
|
| | | |
|