| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function returns a `TimeRangeBound`. That implies a
responsibility on the caller to check the time. It doesn't make sense
for this function to do the check as well.
But, it turns out that in tor-hsclient, the `TimeRangeBound<HsDesc>`
is sometimes processed with `.dangerously` on the assumption that it
was checked earlier. I considered changing this, and storing plain
`HsDesc` and a separate `TimeRange` - but that's not right, because
there are places where the `TimeRangeBound<HsDesc>` is used well after
it was verified.
Instead, in this commit, I (effectively) move the `.check_valid_at`
call from `parse_decrypt_validate` to its principal call site.
This involves a change to the error representation. Previously,
validity time errors ended up as `DescriptorErrorDetail::Descriptor`
containing an `HsDescError::OuterValidation` HsDescError::
InnerValidation`, which in turn contains a
`tor_netdoc::Error`. (`tor_netdoc::Error` is a rather awkward type.)
Now we have our own error variant. The overall behaviour is
unchanged.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Because we now refetch HsDirs on introduce NACK, we need some type of
rate-limiting to prevent clients from hammering the HsDirs if the
service is offline.
This rate-limiting is per-HsDir: the client will avoid querying the
same HsDir more frequently than `hs_dir_requery_period`. The HsDir
requery info is stored in the new `DataHsDirs` map.
Part of #966
|
| |
|
|
|
|
|
|
|
| |
The hspool operations already include their own timeouts, so we
don't need to recalculate them.
For the directory related operations, we now calculate the timeouts
based on actual circuit lengths, and use those timeouts on the
operations themselves.
|
| |
|
|
| |
This would have made #2268 clearer to me.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, run
```
git grep -l "^edition =" |
xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;'
```
Second, manually verify that all Cargo.toml files have changed,
and nothing else has changed.
Third, run cargo fmt again.
|
| |
|
|
|
| |
These errors are suspicious as hsdir inflation attacks, in the
context of prop360.
|
| |
|
|
| |
(This was previously called a parse error, which isn't right.)
|
| |
|
|
| |
Co-authored-by: Micah Elizabeth Scott <[email protected]>
|
| |
|
|
|
|
| |
The `derive_more` crate broke backward compatibility with this version,
so this change involved quite a few manual fixups.
With luck, they'll keep compatibility for some while in the future.
|
| |
|
|
|
|
|
|
| |
The HTTP status text is often useful for diagnosing errors. Tor
directory and hsdir caches frequently put useful messages there,
especially when rejecting an uploaded document.
Inspired by #1142.
|
| | |
|
| |
|
|
|
|
|
|
| |
The effect is that everywhere a RetryError is used, the error sources
for the contained errors will be Display'd.
In tor-hsclient we no longer need to explicitly wrap things up in
tor_error::Report.
|
| |\
| |
| |
| |
| | |
tor-hsclient: Handle handshake completion error correctly
See merge request tpo/core/arti!1336
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Thsi is a bit of a mouthful now, but it is comprehensible.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1336#note_2917235
|
| | | |
|
| | |
| |
| |
| |
| | |
See
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1336#note_2917236
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
We need to handle errors during the handshake. That also produces a
`tor_proto::Error` but we want to print a different message for that,
so let's rename this before adding the new variant.
|
| | |
| |
| |
| | |
It was wrong where ti was.
|
| | |
| |
| |
| | |
Since arti!1233 this is trivial.
|
| |/
|
|
|
| |
For some reason this wasn't used in the actual errors,
although it *was* used in the types of the functions etc.
|
| | |
|
| |
|
|
| |
Otherwise we'll fill up our RAM with junk.
|
| |\
| |
| |
| |
| | |
tor-hsclient: Expire circuits when they get too old
See merge request tpo/core/arti!1287
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
These have been subsumed by other errorkinds, mostly
OnionServiceProtocolViolation and TorProtocolViolation.
In particular please review the change in tor-hsclient closely;
I am not sure about the new errorkinds for the error there.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For higher-level HsDesc-related functions, this type indicates where
exactly an error occurred. It lets us distinguish decryption errors
from parsing errors, and attribute responsibility to the hsdir, the
onion service, or the user's lack of encryption.
This lets us remove some just-introduced complexity in
tor-hsclient.
|
| |/
|
|
| |
Part of #736
|
| |
|
|
|
| |
For the arms that have a fixed retry time, or a fixed ErrorKind,
dont't bind the unused inner error.
|
| |
|
|
| |
Add a cross-reference to docs arising from MR comments in !1246.
|
| | |
|
| |
|
|
|
| |
There is a cross-reference here to code (`IptSortKey`) in another
branch that I haven't made an MR for yet.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
If something *other* than a timeout went wrong, then that is less
expected so more interesting.
|
| | |
|
| |
|
|
| |
Without this, the printed errors are very bland.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Remove TODO comment; instead, replace with a comment about future use
for HS server side, inspired by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1228/diffs?commit_id=ecfd39507c4e8d52788f4599d6275cab3b4a2a5f#c0123bb2f6b9a9ca50fa45886b667580a7dc951e_79_82
Do not implment `tor_error::HasKind`; the true kind depends on where
the bad information came from, which the calling code will understand.
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1228/diffs?commit_id=d63ad3ab041460bf85defb99b31d6ebe075a0eb1#c0123bb2f6b9a9ca50fa45886b667580a7dc951e_101_110
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains code to:
* Iterate over introduction points
* Make multiple attempts to connect
* Apply timeouts to the various phases of each attempt
* Establish a rendezvous point
* Represent errors that occur during the above
It provides places to add:
* Implementation of the INTRODUCE1/INTRODUCE_ACK handshake
* Reception of RENDEZVOUS2 and actual end-to-end circuit establishment
* Recording of the outcome of connection attempts via particular IPTs
* Using previous IPT outcome information for selecting IPTs to try
* Tests of the new code (although more mocking will probably be needed)
Much of this code works with a fixed type ClientCirc rather than going via
the Mockable traits. That is wrong, and it will be fixed later.
|
| |
|
|
|
|
| |
We're going to want to report about rendezvous points in errors.
We'll do this by printing the "number" of the intro point in the descriptor.
|
| |
|
|
|
| |
We're going to want to report about rendezvous points in errors.
We'll be using this. And we'll want to convert it from a Relay.
|
| |
|
|
|
| |
This factors out an ad-hoc AsRef impl. We're going to want to reuse
this for another error type.
|
| |
|
|
|
|
| |
A `NetdocErrorKind` is a `NEK` rather than a `PEK`.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
| |
`ParseErrorKind` was renamed to `NetdocErrorKind`, so we need to
rename this acccessor too.
Signed-off-by: Gabriela Moldovan <[email protected]>
|