| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
() implements encodable which we will derive soon.
|
| | |
| |
| |
| |
| | |
This commit implements NetdocEncodableFields for AddrPolicy in a
non-trivial fashion. A unit test will be added in a moment.
|
| |/
|
|
|
|
| |
This commit makes some policy related constructor functions constant, so
we can use them in const expressions, which will be required for the
next commit.
|
| |\
| |
| |
| |
| | |
tor-netdoc: derives: allow handling deprecated fields
See merge request tpo/core/arti!4118
|
| | |
| |
| |
| | |
We must generally set such a field to the default.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes it possible to derive from a struct with deprecated fields,
without triggering the warning.
This doesn't yet treat encoding as yet, because the only deprecated
field I encountered was `skip` which means the derived encoder never
mentions it.
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
We're going to need this for fudges in round trip tests of consensuses
etc.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're going to turn these into full-on round-trip tests for both
flavours of consensus.
We must temporarily bodge the more comprehensive test, for plain con
sensuses, to to still use the actual document type from poc. That
allows us to avoid changing the arguments to verify() etc. (poc's
verify is subtly different to the real NetworkStatus's.)
When these tests were in poc, they were gated by the incomplete cfg on
the whole of poc. Now they have one each.
Almost entirely code motion; review with
git show --color-moved --color-moved-ws=allow-indentation-change
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There is no separate poc authcert type any more. This is a perfectly
fine test case.
Almost entirely code motion; review with
git show --color-moved --color-moved-ws=allow-indentation-change
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
clippy complains (clippy::needless_borrows_for_generic_args).
In poc, we have an allow with a TODO asking for this to be done
generally in the Arti codebase.
Let's postpone shaving that yak.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We are going to reuse/move this test code. Ie, it is going to be
testing the real network document types.
The naming outside poc is different. To make future diffs a bit less
noisy, change some type names in the test code and fudge it up with a
use.
|
| | | |
| | |
| | |
| | |
| | | |
We have the #1645 allow at the top of lib.rs, so this is unnecessary
bureaucracy. Let's simplify this before adding more to it.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This calculation appeared 3 times.
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
Encode for SpFingerprint
See merge request tpo/core/arti!4116
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
This commit adds a round-trip encoding for SpFingerprint to the already
existing parsing test.
|
| | | | |
| | | |
| | | |
| | | |
| | | | |
Do not shadow s and provide access to Wrapper instead of just the inner
fingerprint. We will make use of this soon.
|
| | |/ /
| | |
| | |
| | |
| | | |
Implements encode::ItemArgument for SpFignerprint. A test will be added
in the next commit.
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
Add ntor onion key cross certificate to RouterDesc
See merge request tpo/core/arti!4109
|
| | | |
| | |
| | |
| | |
| | |
| | | |
This commit moves the construction place for the NtorOnionKeyCrossCert
from the final RouterDesc construction to the crosscert code block,
which should be more correct.
|
| | | |
| | |
| | |
| | |
| | | |
This commit adds ntor_onion_key_crosscert to RouterDesc as well as
integrating it into the legacy parser.
|
| | | |
| | |
| | |
| | | |
No functional change.
|
| | | |
| | |
| | |
| | | |
We will soon need it for the ntor cross certificate.
|
| | | |
| | |
| | |
| | |
| | | |
We will need it for compatibility with the legacy parser soon. Not
super nice.
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
tor-netdoc: port policies: Encode with reject if it's shorter
See merge request tpo/core/arti!4108
|
| | | | |
|