| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| | |
We need this trait for the underlying TLS stream in order to access data
such as the certificates or keying material.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reason for this is because both initiator and responder build the
authentication data in order to send it (initiator) and validate it
(responder).
The build_auth_data() function takes a VerifiedChannel as an argument in
order to access the CLOG/SLOG data and authentication data MUST always
be handled after a channel is verified as in its CERTS has been checked.
Take the opportunity also to add the NETINFO and relay identities data
into the verified channel which will be needed to finalize the channel.
The check() function is now missing the actual validation of the
AUTHENTICATE for a responder which will come in the next commit(s).
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit introduces the RelayResponderHandshake object used when
accepting an inbound connection to open a channel.
There are still TODOs pepperred in the code but the base is implemented.
The Unverified and Verified channel need to be adjusted for this new
handshake.
This will come in the next commits.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
Again, as the CERTS helper, this is used by both initiator and responder
handshake.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
Both initiator and responder send CERTS cell hence this helper.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This requires to make a series of cert and digest also optionnable in
the VerifiedChannel.
This change is needed because as a relay responder, you might get the
CERTS or not depending on if the other side wants to authenticate.
Client and bridges do not authenticate and thus it is expected to not
have a CERTS cell.
This leads to the UnverifiedChannel::check() function to return early
with a VerifiedChannel without any identity attached to it.
Signed-off-by: David Goulet <[email protected]>
|
| |/
|
|
|
|
| |
Code movement only.
Signed-off-by: David Goulet <[email protected]>
|
| |\
| |
| |
| |
| | |
chanmgr: Ability for the ChanMgr to be channel type specific and launch relay channels
See merge request tpo/core/arti!3563
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
They are public but avoid anyone outside implementing them.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To pull this off, ChannelProvider::get_or_launch() needed to change from
"&self" to "self: Arc<Self>" so we could pass self to the spawned task.
This is fine as the caller of ChannelProvider (circuit reactor) has a
Arc<ChanMgr>.
This also removes the PhantomData for the runtime as we now actually use
it.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add traits that will be returned outside tor-proto allowing us to not
expose client and relay specific channels.
The goal is for the tor-chanmgr to get those objects implementing those
traits and can build and run the reactor without knowing the specific
underlying type.
This allows us to have less code duplication and less client/relay
distinction in the chanmgr.
Signed-off-by: David Goulet <[email protected]>
|
| | |
| |
| |
| | |
Signed-off-by: David Goulet <[email protected]>
|
| |\ \
| |/
|/|
| |
| | |
proto: Dedupe IncomingStreamRequestHandler
See merge request tpo/core/arti!3572
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This currently duplicates the client `IncomingStreamRequestHandler`.
To deduplicate it, we need the `hop_num` to be optional (it will be
`None` for relays, and `Some(hopnum)` in the client reactor).
The next commit will fix the code duplication.
|
| |\ \
| | |
| | |
| | |
| | | |
proto: Update outdated reference to rxs in StreamMap docs
See merge request tpo/core/arti!3573
|
| | |/ |
|
| |/
|
|
|
|
|
|
|
| |
Done using the following:
```bash
for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do
cargo set-version -p $crate 0.38.0
done
```
|
| |
|
|
|
|
|
| |
With a protocol violation, we have to immediately deal with such event
before emitting anything on the wire.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This mirrors also the relay reactor. We've introduced the ProtoViolation
into a previous commit which is not an action but rather an "event" that
happened on a circuit.
And so, better semantic. No behavior change.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Because of https://gitlab.torproject.org/tpo/core/torspec/-/issues/385
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
Same as the client reactor, a message outside of our restricted set
leads to a reactor shutdown.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Move the client specific unit tests into the client module.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit removes the CircuitRx* based solely on the client circuit
message and moves it into the top level of the crate so all reactors can
use them.
The client reactor then upon receiving the message, it converts the
AnyChanMsg into a ClientCircChanMsg. On error, this leads to a shutdown
of the entire reactor due to a fatal error.
In order to pull this off, we added a CircuitAction::Shutdown that is
handled as a priority.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
This follows the move of the client specific object.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
| |
Next commit will also move the Relay specific set into the relay module.
These two sets are becoming specific to the reactor as the circuit
reactor communication channel will use AnyChanMsg instead.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |\
| |
| |
| |
| | |
proto: Fix relay/hs-service feature gating
See merge request tpo/core/arti!3534
|
| | |
| |
| |
| | |
We now have add_ent_with_id(), so we can just remove the TODO.
|
| | | |
|
| | |
| |
| |
| |
| | |
Without this, `tor-proto` doesn't compile if you enable the `relay`
feature but not `hs-service`.
|
| |/
|
|
|
|
|
|
|
| |
Fixes part of #2193.
(Edits from nickm: I selected the cases here that I could verify
were correct from immediate context.)
Edited-by: Nick Mathewson <[email protected]>
|
| |\
| |
| |
| |
| |
| |
| | |
proto: Bump criterion, criterion-cycles-per-byte to 0.8.0
Closes #2281
See merge request tpo/core/arti!3528
|
| | |
| |
| |
| | |
Closes #2281
|
| |\ \
| | |
| | |
| | |
| | | |
Make Protocols type inherently interned; add notes about usage.
See merge request tpo/core/arti!3524
|
| | |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We are supposed to pin whenever we enable the `beta` cargo feature,
see
https://docs.rs/derive-deftly/latest/derive_deftly/doc_changelog/index.html#beta-features
Empirically, we somehow failed to do that in tor-circmgr.
In practice not pinning makes little difference since cargo wants to
pick the same version everywhere, but we should be correct. But it is
more maintainable to pin everywhere.
|
| |/
|
|
|
|
|
|
|
| |
This has:
* Fixes to hygiene spans from the new modules feature, needed for
my WIP netdoc encoder derive.
* A substantially richer `${error }` construct.
|
| |\
| |
| |
| |
| | |
proto: Start handling incoming streams in the relay reactor
See merge request tpo/core/arti!3487
|