| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
Typos found with codespell
|
| | |
|
| |
|
|
| |
Such an impl is a footgun. Explain this in docs & comments.
|
| |
|
|
| |
(pre-fmt)
|
| |
|
|
|
|
|
|
|
| |
We want to stop deriving NetdocParseable directly for body structs.
This test case does in fact parse a signed authcert and extract just
the body without verifying the signatures. That's fine in a test, but
we're going to make it involve some hoop-jumping. So, jump those
hoops.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the two separate NetdocParseable and NetdocUnverified derives,
for toplevel signed documents, with a single derive.
This makes the derive API simpler. It will also make it reasonably
possible to avoid deriving NetdocParseable directly for body structs.
Such impls are a security hazard!
In detail:
* Rename NetdocUnverified to NetdocParseableUnverified
* Have it use $IMPL_NETDOC_PARSEABLE from the NetdocParseable deftly
module so that it derives NetdocParseable for the body.
(We'll change this later in the series.)
* Adjust the docs and all call sites.
|
| |
|
|
|
|
|
|
|
|
| |
During encoding, including these hashes in the signature items makes
no sense. The hashes are an *input* to the signature items, but not
part of them.
Move the hashes out of the items. Instead, provide each signatures
section type with a hash accumulator type, in which the hash(es) are
stored.
|
| |
|
|
| |
This is going to contain body information, and the hashes, too.
|
| |
|
|
|
|
| |
This is going to be its own trait and it is usually best if macros are
named after traits, rather than having the macro derive a different
trait depending on meta attributes.
|
| |\
| |
| |
| |
| | |
tor-dirclient: Support for extra-info requests
See merge request tpo/core/arti!3764
|
| | |
| |
| |
| | |
Accidentally left out in the previous commit.
|
| |/ |
|
| |
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test case constructs a "netdoc" which consists of one
dir-key-certification item, and parses it using `AuthCertSignatures as
NetdocParseable`. But we're going to split out the parsing trait for
signatures sections, so that's not going to work any more.
This test tests only corner cases of the derived
SignatureItemParseable implementation; but that's unit tested in the
parse2 tests. (Once upon a time there was perhaps manual parsing code
which needed a specific test.)
Remove it.
|
| |
|
|
|
|
| |
This commit replaces the last remaining uses of `EP::Other` in
`tor-netdoc`, which got removed in arti!3561 but was still made use of
in arti!3592 without causing a merge conflict.
|
| |\
| |
| |
| |
| | |
Implement EncodedAuthCert and use it in poc for votes
See merge request tpo/core/arti!3592
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
The feature arrangements in tor-netdoc are getting to be in need of a
serious overhaul.
|
| | | |
|
| | |
| |
| |
| | |
This probably isn't going to happen, but let's keep the idea in-tree.
|
| | |
| |
| |
| |
| | |
Move the information which still seems relevant out of the plan
document.
|
| | | |
|
| | |
| |
| |
| | |
As per doc/dev/notes/authcert-in-consensus.md.
|
| |\ \
| | |
| | |
| | |
| | | |
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.
|
| |
|
|
| |
With `#[non_exhaustive]`, you're not allowed to write even `Thing { ..base }`.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
The compiler doesn't notice this, but it's odd.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This is in the spec. I don't think it is a great idea to duplicate it
here.
|
| |
|
|
|
| |
These names came from tmp, and we renamed things as we went, but
didn't change the docs everywhere.
|
| |
|
|
| |
Fix the type names while we're here.
|
| |
|
|
| |
This module is now the "proper" tests for the parse2 impl on AuthCert.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
tmp's version of AuthCert is gone. Each of its fields is already in
AuthCert, including the docs links. I've decided not to transfer the
syntax snippets.
The remaining function in that module is now an inherent method on
AuthCert, not on tmp's version.
This needs reformatting since verify_self_signed is now at the wrong level!
|
| |
|
|
|
| |
It's not clear that we want to expose these impls, but our existing
tests (in test::tmp) want them.
|
| | |
|
| | |
|
| |
|
|
| |
This will enable parse2 to process it.
|
| | |
|