| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/249#note_2771025
It doens't really handle it.
|
| |
|
|
|
|
|
|
|
| |
read_exact has a loop in it, which we need.
This means we end up separating the two sites that generate the "not a
relay" error, so we need to fish out the error construction.
As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/249#note_2771023
|
| | |
|
| |
|
|
| |
Discovered by clippy
|
| |\
| |
| |
| |
| | |
chanmgr: get rid of Arc around Channel
See merge request tpo/core/arti!236
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
(spoiler: not until we have a relay implementation)
Closes #53.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This is a fine example of why booleans are risky:
it's far to easy to pass "animate:bool" into "inanimate:bool" like
we did here.
This is a followup from our fix to #294.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously we were requiring authenticated sendme cells exactly when we
should be permitting the old format, and vice versa.
This bug was caused by using a boolean to represent one property, but
with giving that boolean two different senses without inverting at the
right time.
The next commit will prevent a recurrence.
Closes #294
|
| |/
|
|
|
| |
(We don't need to look at SendmeEmitMinVersion since higher
values are not yet defined.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit addresses multiple problems highlighted by arti#182:
- `arti-client` had some types in its public API that weren't accessible
without importing another crate (`CfgPath`, `DataReader`,
`DataWriter`). This has been fixed.
- In addition, the doc comments for `DataReader` and `DataWriter` were
cleaned up to be of better quality, now that they're public.
- It was impossible to use `arti-client` without also importing
`tor-rtcompat`. This is now fixed by the addition of two convenience
methods: `TorClient::bootstrap_with_tokio` and
`TorClient::bootstrap_with_async_std`.
- Potentially controversially: `tor-rtcompat` now returns *concrete*
types from methods like `current_runtime`, instead of `impl Runtime`.
- This was needed in order to actually be able to name the `TorClient`
type that results from using these methods.
- This does mean we lose API flexibility, but on balance I think this
is a good thing, because the API we *do* have is actually usable...
|
| |
|
|
|
| |
Previously they took Arc<Self>, and then Self, but &self is perfectly
fine here.
|
| |
|
|
|
|
| |
See the new commentary text on `ClientCirc` for the rationale.
Signed-off-by: Ian Jackson <[email protected]>
|
| |\
| |
| |
| |
| | |
prefer 'unwrap_or_default' to manual constructor
See merge request tpo/core/arti!215
|
| | | |
|
| |\ \ |
|
| | |/ |
|
| |\ \ |
|
| | |/ |
|
| |/ |
|
| |
|
|
|
| |
These will require thought; should we ignore them, act on them, or
continue to treat them as internal errors?
|
| |
|
|
|
| |
Previously the code would let us try to install a meta-cell handler
before the old one was done, leading to possible confusion.
|
| |\
| |
| |
| |
| | |
tor-proto: use const-time eq on sendme tags.
See merge request tpo/core/arti!201
|
| | |
| |
| |
| |
| |
| |
| | |
There's no known attack here, but it's best practice to always compare
digests using a constant-time comparison operator.
This resolves an XXXX comment.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Previously we'd always set it to true, allowing one CONNECTED per
half-closed stream even if the stream had already received a
CONNECTED cell.
This resolves an XXXX.
|
| |/ |
|
| |
|
|
|
| |
This was an XXXX before. Now it explains why the behavior is safe for
now, but maybe not forever.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It makes sense to put the method for human-readable strings onto the
type itself, so that we can format these whenever they occur.
I'm choosing the "human_str" method name here, since caret-generated
types already have a to_str. I was thinking about using Display,
but caret types already implement that.
I've also moved the message from "warn!" to "debug!", since these
aren't necessarily a problem condition.
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Always check whether stream-level SENDMEs are expected.
Closes #261
See merge request tpo/core/arti!192
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(It's a protocol violation to get a SENDME when our send window is
already full.)
This patch makes SendWindow::put return a Result, so that it's
easier to do the right thing with it.
Closes #261.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
arti!126 overhauled the `tor-proto` circuit reactor, but left out one
very important thing: actually decrementing the SENDME window for
streams (not circuits) when we send cells along them.
Since the circuit-level SENDME window would often prevent us from
running into a problem, this wasn't caught until my benchmarking efforts
noticed it (in the form of Tor nodes aborting the circuit for a protocol
violation).
fixes arti#260
|
| | |
|
| |
|
|
|
|
|
| |
[T;N] supports TryFrom<Vec<T>>, and has since Rust 1.48: we can just
use that.
This resolves an XXXX comment.
|
| |\ |
|
| | | |
|
| |/
|
|
|
| |
We generally try to track the latest rust-crypto traits when we can:
fortunately, this upgrade didn't break much, considering.
|
| |
|
|
| |
There is now a ticket about this issue in general, at arti#254.
|
| |
|
|
|
|
|
|
| |
We want to only use TODO in the codebase for non-blockers, and open
tickets for anything that is a bigger blocker than a TODO. These
XXXXs seem like definite non-blockers to me.
Part of arti#231.
|
| | |
|
| |
|
|
|
|
| |
This test seems unreliable on CI: we've got to disable them for now
so that we have a working CI system. The CI failure is #238; the
ticket to repair them is #244.
|
| | |
|
| | |
|
| | |
|