| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| | |
tor-netdoc: ExpandedKeypair for Ed25519NtorCrossCert::new_signed()
See merge request tpo/core/arti!4155
|
| | |
| |
| |
| |
| |
| |
| | |
This commit changes Ed25519NtorCrossCert::new_signed() to accept an
ExpandedKeypair instead of a Keypair, because when converting the ntor
key using convert_curve25519_to_ed25519_public(), only the
ExpandedKeypair is returned, which is a one-way conversion from Keypair.
|
| |\ \
| |/
|/|
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| | |
This commit wraps the port policies in an Intern.
|
| | |
| |
| |
| | |
This commit wraps the relay family in an Intern instead of an Arc.
|
| | |
| |
| |
| |
| | |
This updates semver.md with the breaking changes done to the Ed25519
certificate verification methods.
|
| |\ \
| |/
|/|
| |
| | |
Derive NetdocParseableUnverified for RouterDesc
See merge request tpo/core/arti!4134
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| | |
This lets us skip fields which have the default values.
|
| |/
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This commit implements NetdocEncodableFields for AddrPolicy in a
non-trivial fashion. A unit test will be added in a moment.
|
| | |
|
| |\
| |
| |
| |
| | |
Implement encoding and verification for consensuses, and add a round trip test
See merge request tpo/core/arti!4100
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Encode for SpFingerprint
See merge request tpo/core/arti!4116
|
| | |/
| |
| |
| |
| | |
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 adds ntor_onion_key_crosscert to RouterDesc as well as
integrating it into the legacy parser.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
| |
ItemArgumentParseable does not make much sense because the field is
effectively a free-form field similar to ContactInfo.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This commit adds the NtorOnionKeyCrossCert data type; a data type
implementing ItemValueParseable, intended for use within RouterDesc and
parse2.
This type wraps around the previously added Ed25519NtorCrossCert type in
a fashion that honors the `bit` argument.
|
| |
|
|
|
|
|
| |
This would let us use `.parse_arg::<String>()` in old parsing code.
I wanted this for recommended versions, and then didn't use it, but it
seems useful anyway.
|
| |\
| |
| |
| |
| | |
tor-netdoc: routerstatus: add missing fields
See merge request tpo/core/arti!4061
|
| | | |
|
| | |
| |
| |
| |
| | |
Adds RouterDesc::hidden_service_dir as well as an accompanying ZST
token.
|
| |/
|
|
|
|
|
|
| |
This commit modifies RouterDesc to replace all occurrences of `bool`
with `Option<ItemPresent<T>>` while adding respective ZST tokens for the
respective items.
In this case, it adjusts caches_extra_info and tunnelled_dir_server.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the Ed25519NtorCrossCert type for use with
EmbeddedCert.
So far, this certificate may not be used directly tet, because of the
non-trivial X25519 -> Ed25519 conversion which is explained in a doc
comment.
The next commits will add more parse2-like types for actually parsing
it, by honoring the `bit` found in `ntor-onion-key-crosscert` items.
A unit test will be added in the immediate next commit.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
TimerangeBound is reasonably nice and this will fit in better when we
want to verify votes.
Adjust the one non-test call site (in tor-dirserver) using .and_then.
In the tests:
* Where we expected success, call .check_valid_at and add another .unwrap().
* Where we expected signature verification failure, delete the time parameters.
* Where we expected timeliness failure, call .check_valid_at and map the error.
* With nontrivial tolerance, add calls to `extend_[pre_]tolerance`.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
All of the pieces are in place for this now.
Some of the pieces are not entirely complete or correct at this point:
that's sorted out by other MRs already open.
Currently there is no encoding, no verification functdion, and no
tests. Encoding depends on another oustanding MR (arti!4058).
Verification depends on the rework in arti!4065.
Tests are still to come.
|
| |
|
|
|
| |
The actual item field isn't in the struct yet, because that would
produce conflicts with other outstanding work in this same struct.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the ItemPresent type, which is intended for token types
where the mere presence implies a truthful value, such as
`tunnelled-dir-server`.
For now, it lives in `ignored_impls` because it does in fact ignore
(actually rejects) everything around the item except the keyword.
The type implements ItemValueParseable and ItemValueEncodable; both
implementations being very minimal and only parsing/emitting the
keyword.
A test will be added within the next commit.
|
| | |
|
| |
|
|
| |
This field is taken from the spec.
|
| |
|
|
| |
This commit adds the contact field to RouterDesc.
|
| |
|
|
| |
This commit adds support for the overload-general field to RouterDesc.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|