| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Implement inet-auto connect points in rpc
Closes #1844
See merge request tpo/core/arti!3606
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| |/ / / |
|
| |\ \ \
| |/ /
|/| |
| | |
| | | |
clippy: Fix missing doc for non-Linux builds
See merge request tpo/core/arti!3611
|
| | |/ |
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
arti: Downgrade "stream closed without END" warning to debug.
Closes #2304
See merge request tpo/core/arti!3608
|
| | |
| |
| |
| | |
We now need it whether or not http-connect is enabled.
|
| | |
| |
| | |
Co-authored-by: carti-it <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
This isn't the long-term solution to error reporting and proxies,
but it is a start that we can work from.
Closes #2304.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As near as I can tell, there are only three ways that the sender
corresponding to this rx can be dropped:
- `StreamMap::terminate` because the stream object itself was
dropped. (But see #2323.)
- `StreamMap::close_stream` because an END message or similar
has been received. (But see #2322.)
- The `StreamMap` has been dropped.
The first two cases are already handled, and AFAICT the third can
only happen when the circuit hop closes. That makes
`CircuitClosed` the appropriate error here, not `StreamProto`.
Part of a fix for #2304.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Fix some minimal dependency requirements for slab and rustls
Closes #2327 and #2325
See merge request tpo/core/arti!3609
|
| | | | |
|
| |/ /
| |
| |
| |
| | |
This is needed since we rely on `Slab::new()` being a const fn, which
was only added in 0.4.7.
|
| |\ \
| | |
| | |
| | |
| | | |
tor-dirserver: Make compression failures a bug
See merge request tpo/core/arti!3605
|
| | | |
| | |
| | |
| | |
| | | |
This commit adds a comment explaining why we treat compression errors as
a bug.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit removes `DatabaseError::Compression` because it does not fit
in. Right now, this single variant makes the error to be call-site
oriented which is not nice for error handling. Instead, this error
should indicate that something was truly wrong with the database in
itself, such as an invalid schema, a low-level SQLite bug, etc.
Instead, we now map a compression error to `DatabaseError::Bug` because
there is no good reason on why it should fail, given that we compress
memory data to memory data. Probably because it uses the
`std::io::Writer` interface which itself demands use of
`std::io::Result`.
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
tor-log-ratelim: Avoid logging when there's no update
Closes #2320
See merge request tpo/core/arti!3603
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adds a new `AppearsResolved` status to indicate that there have been
successes and no failures. The `Dormant` status now means that there has
been no activity.
|
| | | | | |
|
| | | | | |
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
proto: Implement relay responder handshake and finalize it for both handshakes
See merge request tpo/core/arti!3596
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commits returns either Some(AUTH_CELL, CERTS) or None. We future
proof ourselves against one Some and other None even if an error check
is done before.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Remove the channel type from Unverified and Verified channels and
instead use the channel type in the underlying channel codec.
The codec requires such type in order to restrict messages sets. Instead
of duplicating it, this commit simply makes it that there is now only a
single channel type attached to a channel structure.
The resulting `struct Channel` in the end gets it copied from the
channel codec as the framed_tls gets split and given to the `Reactor`.
Down the line, we need a channel type attached to the `Channel` in order
to know if it is a client or not and authenticated or not.
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]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Avoid having one None and the other Some which would be a bug.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead, use the static AUTHTYPE_ED25519_SHA256_RFC5705 value which is
for now the only version we support.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
A Responder receiving cells from the Initiator, if it gets a CERTS, an
AUTHENTICATE must also be present (and vice-versa).
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is so check() only authenticate a channel. The finish() function
now only sends back the missing cells and build the final Channel.
To pull this off, the AUTHENTICATE cell and our IP addresses need to be
copied into the VerifiedRelayChannel.
This allows us to remove complexity into the check() function as well
and future commit will remove the async.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We can't get into the UnverifiedChannel::check() without wanting to
verify our identities and authenticate.
This validation has moved before calling check() for the relay channel
type.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Reason for this is so we can use the type system to enforce that a
client/bridge<-> relay channel can never become verified and thus in the
code path of authentication.
In other words, when check() is called, without an authentication cell,
we can't authenticate or even verify the identities so we immediately
return "self" which in this case is the UnverifiedRelayChannel.
That channel can be finish()-ed to yield a Channel that can never be
considered authenticated.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Once channel is verified and authenticate if need be, send the NETINFO.
We require our advertised IP addresses for this so pass them to launch()
as well to the UnverifiedRelayChannel.
A cargo fmt change slipped in here, sorry about that.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit is a bit loaded but it is coherent.
First, we set Eq and PartialEq to the channel message Authenticate so we
can compare it with the one we expected.
Second, the AuthenticationCell enum is introduced to store either an
AUTH_CHALLENGE or an AUTHENTICATE since one side of the handshake can
only have one. This allows us to store one or the other in
UnverifiedRelayChannel.
Depending on what we have, the authentication process is different as it
dictates which side we are on (initiator vs responder). Keep in mind
that the handshake code enforces receiving a AUTH_CHALLENGE along side
CERTS. And same goes for AUTHENTICATE which means that if we have an
AUTH_CHALLENGE in the UnverifiedRelayChannel, it is certain that the
other side wants to authenticate and we are the initiator.
Finally, the sending of CERTS and AUTHENTICATE by the initiator is now
in UnverifiedRelayChannel::check() done right after verifying the
channel CERTS and holding a "VerifiedChannel" object.
This means that the last piece, sending the `NETINFO` by the initiator
will be done in the check() but in a future commit. This leaves the
VerifiableChannel::finish() to send nothing and only finalize the
channel with the NETINFO (canonicity).
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Relay initiator needs to send CERTS and AUTHENTICATE in that function
after verifiying the channel.
And thus require to be async.
Signed-off-by: David Goulet <[email protected]>
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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]>
|