| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | | | | |
|
| | |_|_|/ / /
|/| | | | |
| | | | | |
| | | | | | |
This appears often in the arti logs, but is a normal thing to happen.
|
| |\ \ \ \ \ \
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-proto: Allow sending DATA cells on closed streams
Closes #2434
See merge request tpo/core/arti!3824
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Previously we would close the circuit, which isn't great because there
can be other streams in use on the circuit.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | | |
Co-authored-by: Ian Jackson
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit documents that a u16 overflow in a certain branch is
impossible due to the properties of a BTreeSet over which an iteration
takes place.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | | |
Co-authored-by: Ian Jackson
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Callers now have to use PortRange::new which checks the input.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit refctors PortPolicy to use the new PortRanges, alongside
removing the now duplicate code.
The new PortPolicy implements ItemValueParseable, which makes it
possible to nicely parse it. Unfortunately, we cannot derive it
directly, because we do not store the RuleKind but instead parse it and
then invert the ranges in order to save space. However, internally this
is derived using a wrapper type from which we extract from.
The old FromStr implementation continues to be as bad as it has always
been because improving it would likely introduce more bugs than it would
solve, given that the legacy implementation has been there since forever
basically.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit copies the logic found in portpolicy.rs into its parent
module, namely into a type called PortRanges. Most of the code was
copied one by one, with only slight adjustments having been done.
The compression and inversion logic is the same though.
The purpose of this is to implement ItemArgumentParseable on this, which
is not really possible with a Vec<PortRange> because the port policies
have a weird format: Semantically they consist of multiple arguments
(i.e. multiple port ranges) but syntactically they are encoded as a
single netdoc argument, because there are no spaces in between.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit moves RuleKind from addrpolicy to policy because it is also
required for port policies.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
derive-more 2.1.1 makes use of the rename_all features in the display
and from_str proc-macros, which do not exist in 2.0.1, meaning
minimal-versions will fail.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit removes the implementation of ItemArgumentParseable for
curve25519::PublicKey in favor of using the already existing
Curve25519Public, which also got beefed up slightly.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit refactors Ed25519IdentityLine by deriving as much as
possible.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit improves on Ed25519Public to be parseable via parse2 as well
as reducing redundancy by utilizing FixedB64.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit uses a proper PEM parser as a dev-dependency to tor-netdoc
for parsing PEM entries, instead of hard-coding long DER byte strings.
It is better to use an external crate for this here, rather than the
existing somewhat accessible (only through traits) implementation of
parse2, because it feels wrong testing parse2 with parse2.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit fixes a bug in the microdescriptor parser to properly parse
multiple family-ids.
Previously, we interpreted the spec to simply contain multiple
`family-ids` lines. This is wrong however. Instead, there may only be
a single such line with multiple values.
To fix this issues, we itnroduce a `RelayFamilyIds` type, similar to
`RelayFamily`, that stores multiple `RelayFamilyId` entires in a `Vec`.
Then, we just derive `ItemValueParseable` on it and win.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This makes it possible to parse2 micro descriptors, which will be very
useful later on.
For this, it makes a few changes. Most notably, it introduces a
(private) field called `onion_key`, which stores an optional RSA onion
key, as it serves as the introduction line for this netdoc document
type. Besides, it also changes the `ed25519_id` type to the
`Ed25519IdentityLine` wrapper type, although the signature of the
respective getter remains the same.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is a sane default, because rejecting all ports is the default for
relay configurations as well as the default of when this field is absent
in netdocs.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit implements ItemValueParseable for PortPolicy. Unfortunately
we cannot use NormalItemArgument because it contains spaces, leading to
multiple arguments.
In a later commit, we may migrate this fully to parse2 because right
now, it just wraps around its FromStr implementation.
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit replaces the inner value of RelayFamily to use a LongIdent
instead, which it already uses for parsing, in order to derive
ItemValueParseable on it, so we can use it within parse2 magic.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit makes LongIdent parseable by implementing NormalItemArgument
as well as the required Display for it. Besides, it also derives Hash
on it.
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit improves upon B64 by implementing NormalItemArgument for it,
as well as implementing a wrapper type for it, called FixedB64, that
works just like B64 except that the resulted inner-value must be of a
certain compile-time-specified fixed length, which is useful for things
such as digests.
|
| |\ \ \ \ \
| |_|_|_|/
|/| | | |
| | | | |
| | | | | |
Update to derive-deftly 0.11.0 to pick up `meta_quoted rigorous`
See merge request tpo/core/arti!3855
|
| | | | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Now some bugs have become visible.
* Properly ``-quote the name in the heading.
* Add a missing space before `{`
* Adjust the fields to level-4 indent.
* In `construct()`, ``-quote the name, and xref it in the body,
not the title (which rustdoc makes a link to the fn itself)
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This lines all the docs lines up, so we can see our indentation.
No change to the generated docs.
|