| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
|
| |
Filed
https://gitlab.torproject.org/tpo/core/arti/-/issues/1176
proposing a final fix.
|
| |
|
|
| |
Resolves clippy complaints about needless fallible conversions.
|
| |
|
|
|
| |
FTR I don't think agree with clippy on this question, but then I often
don't.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is pure renaming, done automatically with rust-analyzer.
Comment fixes and other cleanups will be in the subsequent commits.
We're doing this renaming because we need a name for
the combination of a `RelayMsg` and an `Option<StreamId>`
that we use when we have a `RelayMsg`
we intend to route to a given stream or circuit internally.
Previously we called this a `RelayCell`,
but that name was already somewhat inaccurate,
and will become _very_ inaccurate with the arrival of prop340,
which breaksthe 1:1 relationship between relay cells
and relay messages.
(If we didn't do this renaming now, we'd soon be making
the relationship between `UnparsedRelayCell`and `RelayCell`
many-to-many, which would be ridiculous and confusing.)
The `RelayMsgOuter` name is a placeholder:
We expect that we'll want to rename this type,
and may also want to rename `RelayMsg`,
and unify our vocabulary in other areas too.
But such a renaming will have to wait
for a larger discussion affecting the specifications,
so that we can use the same vocabulary everywhere.
|
| |
|
|
|
|
|
|
|
|
| |
An encoded set of extensions in the ntorv3 handshake includes a header
with the number of extensions. This change adds that header.
It also changes `write_many_onto` to take a slice instead of an
iterator, since we need to know the number of extensions up-front. In
principle we could take a clonable iterator instead and use
Iterator::count, but it's probably not worth the extra complexity.
|
| |\
| |
| |
| |
| |
| |
| | |
Convert to the latest versions of dalek-cryptography
Closes #808
See merge request tpo/core/arti!1767
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This code was needed with the old version of dalek-cryptography,
which wasn't compatible with up-to-date versions of the `rand`
crate(s). But now that we've upgraded, we can drop this.
(We could have left it around and deprecated it, but we are already
making a breaking change to tor-llcrypto by upgrading
dalek-cryptography.)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The main changes that we have to adjust for are as follows:
* In x25519-dalek:
* `StaticSecret` is now behind a feature.
* `StaticSecret::new` is deprecated in favor of
`StaticSecret::random_from_rng`.
* StaticSecret no longer does its own clamping.
* In ed25519-dalek:
* `SecretKey` has (in effect) been renamed to `SigningKey`. The name
`SecretKey` is now an alias for `[u8; 32]`.
* `SigningKey` is effectively a keypair, since it contains a
public key as well.
* `PublicKey` has been renamed to `VerifyingKey`.
* The functions to extract a signing key and verifying key have
been renamed as you might expect.
* `ExpandedSecretKey` has been moved to `hasmat` and no longer
implements `sign`.
* `ExpanededSecretKey` now has as its elements a scalar and a hash
prefix.
* Various functions that took `&[u8]` now take `&[u8; N]`.
* We no longer need a wrapper for older versions of rand.
There is a single test in tor-keymgr that does not pass. I've
marked it as ignore for now, in hopes that @gabi-250 can help me
figure it out.
This closes #808. There are several changes I want to make before
we merge, however. They are marked with TODO DALEK.
|
| | |
| |
| |
| |
| |
| | |
This makes it possible to see the wood for the trees.
This may be controversial, but I think it's an improvement.
|
| |/
|
|
|
| |
These messages are very verbose and I doubt anyone will want them,
usually, even when debugging.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| | |
This is in keeping with the behavior of C tor, and of
torspec!179.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
While looking for differences, we found that C tor always
omits the flags and the hostname from a BEGIN message sent on an
onion service circuit. In torspec!179, we specified that behavior.
This patch brings arti into conformance.
Closes #1077.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Use consistent phrasing when describing the two key fields to make it
clear they're referring to the same relay.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously it was possible for `handler` to be None only when
`msg` was also None, which would make SendMsgAndInstallHandler into
a no-op. Now, if `msg` is present but `handler` is absent, we
use the previously installed handler, which I think was our
intention.
Without this patch, `Conversation::send_message` simply won't work.
Fixes #1085.
|
| | |
| |
| |
| |
| |
| | |
(We already require that it is Send when the client gives it to us
in circuit.rs, but we had previously forgotten that when we stored
it in the Reactor.)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Peraonally I would prefer
| #![cfg_attr(not(all(feature = "full", feature = "experimental")),
| allow(dead_code))]
but I think that is almost certainly controversial.
See tpo/core/arti#704.
|
| | |
| |
| |
| |
| | |
As per this comment, and preceding discussion
https://gitlab.torproject.org/tpo/core/arti/-/issues/1060#note_2959187
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This changes the internal representation to be `NonZeroU32` instead of
just `u32`.
Various places where a circuit ID is optional now use `Option<CircId>`.
Fixes a bug in `CircIdRange::sample` that would previously return a
circuit ID of 0, when the rng returned 0x8000_0000 for a low range.
|
| |/ |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Refactor the stream-closing logic in tor-proto
Closes #1065
See merge request tpo/core/arti!1681
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Because dropping a `StreamTarget` causes the circuit reactor to send
an End, the previous do-nothing implementation of `discard()` wasn't
sufficient to cause the request to be ignored without sending an
End.
This commit modifies our "close pending stream" behavior to only
optionally send an End message. To avoid confusion, I'm using a new
`CloseStreamBehavior` enum rather than an `Option<End>`, since we
had previously used `None` in some cases to indicate a default
(misc) end message.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
Now that every state-change function consumes the IncomingStream,
there is no longer any reason to keep track of an internal state
enum.
|
| | | |
|
| | |
| |
| |
| |
| | |
Now that IncomingStream doesn't implement Drop, we can just
destructure it.
|
| | |
| |
| |
| |
| | |
Since dropping a StreamTarget will send an End, we don't need
to call reject_internal in this case.
|
| | |
| |
| |
| |
| |
| |
| | |
Now that `StreamMap::terminate` no longer panics, and now that it
permits the kind of double-call that we allow, we can close #1065.
Closes #1065.
|