| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace poc code with new ConsensusAuthoritySection.
This is an entirely new parsing approach.
Key differences:
* We parse the arguments to dir-source, which poc didn't.
* We don't clone the input and fully parse the first item; instead,
we dismantle the dir-source line ad-hoc to determine the item type.
* Rather than a Vec of Enums, we parse into two Vecs
of the different entry types.
The few lines that aren't rewritten show up as moved in
git show --color-moved --color-moved-ws=allow-indentation-change
but I suggest reviewing the new implementation de novo.
|
| |
|
|
|
| |
This is the type corresponding to a "superseded authority key entry",
which is a single dir-source line with a weird nickname.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is going to handle the bizarre `-legacy` nickname encoding for
superseded authority keys. That's going to be a fair amount of code,
some derived from DirSource. Make a module for it all.
We're going to take a different approach that in poc. So there's
going to be all-new code and then the poc version will be deleted.
They don't resemble each other very much.
In this commit: just code motion, and the creation of the new module
with associated doc comment. Review with --color-moved.
|
| | |
|
| | |
|
| |
|
|
|
| |
We must add to our ad-hoc derive, since the normal derive can't do the
encoding either.
|
| |
|
|
|
| |
Use deftly's field loop, rather than handcoding the two fields.
(We don't expect to add any fields, but if we did this would be more correct.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Almost entirely code motion. Review with --color-moved.
This is new correct for votes, and uses the non-poc names for things.
We'll improve up a few minor things in a moment.
The cfg situation is getting very tangled. There are already various
TODOs about this. I think it is time to bite the bullet; I will do
that separately from this MR.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Deprecate the compatibility alias.
|
| |
|
|
| |
Use the terminology from the spec.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This makes the struct more legible.
|
| |
|
|
|
|
|
|
|
| |
plain-consensus
"incomplete" is correct since encoded authcert depends on votes.
"plain-consensus" is going backwards, but stripping "plain-consensus"
gates from everything will be very intrusive.
|
| |
|
|
|
| |
See torspec#401 and
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3864#note_3397715
|
| |
|
|
|
|
|
| |
Now it follows, rather than precedes, the parse2_impls and
encode_impls modules that it imports things from.
Pure code motion apart from deleting the todo.
|
| | |
|
| |
|
|
| |
We don't need the helper struct for this.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're going to want this macrology to generate a encoder
implmeentation too. It's most convenient to make this its own module,
separating it from parse2_impls.
Enable the module if encoding is enabled, decorating its
parsing-related contents with the appropriate cfg.
Use pub(super) to export the encoding-related imports, so that we
don't end up with endlessly duplicated import lists.
Now there is place where we can put the encoder.
|
| |
|
|
|
|
| |
Start a new encode_impls module.
The pub(super) will be used in a moment.
|
| | |
|
| | |
|
| |
|
|
| |
This is what we did for authcert.rs and it worked well there.
|
| | |
|
| |
|
|
| |
Typos found with codespell
|
| |
|
|
|
| |
This commit adds a TODO to implement a trait combining the common fields
in a network status documents.
|
| |
|
|
|
|
|
|
|
|
| |
This was a weird name, and while working in this area it all seemed to
make the docs strange.
Rename it. This is quite invasive!
In theory we could have the macros generate compatibility aliases, but
that seems quite complex.
|
| |\
| |
| |
| |
| | |
Implement authority certificate management
See merge request tpo/core/arti!3561
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit marks the ConsensusFlavor struct exhaustive because handling
it in a non-exhaustive fashion would cause lots of redundant error
handling in tor-dirserver.
Besides, a change in the list of consensus flavors should indeed be
breaking for applications making use of this struct, as it is quite a
heavy change, from a netdoc point of view.
|
| |/
|
|
|
|
|
| |
This struct is still a bit odd, and there's a todo saying we may
change it again, but at least now it's now available.
While we're here, rename the variant Tor to CTor.
|
| |
|
|
|
| |
AuthCert is about to lose its copy of H(KP_auth_sign_rsa) so it needs
to return an owned value.
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3550#note_3312670
|
| |
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3550#note_3312669
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
I feel that before merging all this, I ought at least to demonstrate
that it can be applied to at least one real type!
We can unconditionally `#[derive(Deftly)]`. That is simpler, and
harmless if no actual deftly derives are applied.
|
| | |
|
| |
|
|
|
|
|
| |
Previously, this value was stored in a u16. However, because this
number is usually always derived from some sort of list type, such as
`Vec`, it makes more sense to use usize for this, as it avoid
unnecessary casting and error checking.
|