| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
|
|
| |
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4070#note_3422637
We must allow it in poc, but poc is a thing we're trying to
abolish/replace, so that's OK.
|
| | |
|
| | |
|
| |
|
|
|
| |
This makes the code clearer, especially since we're going to add
attributes.
|
| | |
|
| |\
| |
| |
| |
| | |
tor-netdoc Rename NetdocUnverified trait to NetdocParseableUnverified
See merge request tpo/core/arti!4043
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The NetdocParseableUnverified derive macro implements this
trait (amongst other things). Traits and derive macros should have
aligned names.
This is only used for parsing, so let's keep the "Parseable" part of
the name.
I don't think the effort of deprecated alias, for downstream
compatibility, is worth it, our compatibility policy notwithstanding.
|
| |/
|
|
| |
We do now support encoding.
|
| |
|
|
| |
As per #2492.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
| |
This will allow us to use it for encoding as well as parsing.
|
| | |
|
| |
|
|
| |
Such an impl is a footgun. Explain this in docs & comments.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
I keep not finding it because all the other signatures stuff is in
signatures.rs.
|
| |\
| |
| |
| |
| | |
Implement EncodedAuthCert and use it in poc for votes
See merge request tpo/core/arti!3592
|
| | | |
|
| | |
| |
| |
| | |
Roughly as per the proposal in `doc/dev/notes/authcert-in-consensus.md`.
|
| | |
| |
| |
| |
| |
| |
| | |
This commit changes `ErrorProblem::Other` to
`ErrorProblem::OtherBadDocument` while adding two new variants:
* `ErrorProblem::Internal`
* `ErrorProblem::BadApiUsage`
|
| |/
|
|
|
|
|
| |
This commit adds an out-of-bounds memory check to
parse2::parse_netdoc_multiple_with_offsets while adding the guarantee
that interfacing applications do not need to validate the returned usize
values to be in-range.
|
| |
|
|
|
|
|
|
| |
We can call this type authcert::CrossCert.
The names in the docs are getting rather wrong, and right now the docs
build produces warnings. We'll tidy all that at the end after we're
done moving and renaming.
|
| |
|
|
|
| |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3554#note_3313768
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This commit implements directory authority certificates using the
`parse2` approaches.
For now, those are in a module `doc::authcert::tmp`, with the eventual
goal of moving it into its super module after removing/deprecating the
legacy types.
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit moves the "Naming Convention" of the parse2::poc module into
the respective module, as it does not apply to parse2 itself, as
outlined in arti!3462.
With this commit, there remains `NdaSystemTimeDeprecatedSyntax` as the
only type outside poc following this naming schema. However, because it
is more or less already deprecated anyways, there is no real need to
bother with it any further.
|
| |
|
|
|
|
|
| |
We're going to use this for the encoder testing too, so it needs to be
not buried inside parse2.
This commit is the file rename plus minimal changes to make it compile.
|
| | |
|
| |
|
|
| |
There are currently no options.
|
| |
|
|
|
|
|
| |
We're going to add options arguments, effectively, to the parsing
entrypoints. To avoid a proliferation of entrypoints (eg,
parse_multiple_with_options), encapsulate the run-time input values in
this structure.
|
| |
|
|
| |
This now exercises all the new parsing code.
|
| | |
|
| |
|
|
| |
This seems to have been overlooked.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Use the standard multiplicity technique rather than the ad-hoc impl on
Option. This allows us to support an ad-hoc parsing function for a
field that's `Option`.
Disentangle the `label` field attribute, which did both setting the
label, and expecting a different parsing approach: replace it with
`with`.
|
| | |
|
| | |
|
| |
|
|
|
| |
The netstatus doc poc does test most of the functionality, but I want
some tests of edge cases that that misses.
|
| | |
|
| | |
|
| |
|
|
| |
This can parse and validate the signatures on a consensus.
|