| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| | |
This is fairly straightforward, thanks to our existing design work
on this code.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
- We make the tor-guardmgr "We have found that {} is usable" line
include the word "guard", otherwise it doesn't appear very useful to a
user in safe logging mode, since the guard gets replaced with
[scrubbed].
- The "Actually got an end cell..." message is downgraded to DEBUG.
|
| | | |
|
| | |
| |
| |
| | |
This is still not the most beautiful interface, but it'll do for now.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
There were two bugs here that made the behavior unlike that of C
tor: we had swapped the MAC inputs, and we had forgotten to include
the public key X in the input.
|
| | |
| |
| |
| | |
We'll want these so we can implement some test vectors.
|
| | |
| |
| |
| |
| |
| |
| | |
I think that these Input structs had been defined so that we could
use hs_ntor interchangeably with other handshakes. The trouble is,
though, that it doesn't really work like any other handshakes we
have.
|
| | |
| |
| |
| |
| |
| | |
Note that some of the invocations for this function seem to put the
key and the message in a questionable order. But that's a thing to
figure out later, while debugging.
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| |
| |
| | |
Refactor ClientCirc APIs to use Arc<ClientCirc>.
Closes #846
See merge request tpo/core/arti!1187
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now ClientCirc is no longer `Clone`, and the things that need it
to be `Clone` instead return and use an Arc<ClientCirc>
We're doing this so that ClientCirc can participate in the RPC
system, and so that its semantics are more obvious.
Closes #846.
Thanks to the type system, this was a much simpler refactoring than
I had feared it would be.
|
| |/ |
|
| |
|
|
| |
The `new` function is deprecated in x25519-dalek 2.0.0-rc.2
|
| |
|
|
|
|
|
|
| |
If we didn't do this, we would need to transfrom
`EncodedLinkSpec`s into a `LinkSpec::Unrecognized`, which is not
semantically right. What's more, every user of this API wants to
consume encoded link specifiers, so encoding them early saves a
little effort.
|
| | |
|
| |
|
|
|
|
|
| |
This is a workaround for an issue that I'm about to encounter
somewhere in our pile of dependencies as I add arti-rpcserver, and
somehow make serde_json visible in this test code thereby, making
the PartialEq method resolution ambiguous.
|
| |
|
|
|
| |
This commit is mostly code movement; I'd recommend reviewing it
with git's `--color-moved` option.
|
| |
|
|
|
|
|
|
| |
Now
nailing-cargo +stable clippy -p tor-hsclient --all-features --all-targets
actually works.
squash! Add some missing imports
|
| |
|
|
| |
Closes #784.
|
| |
|
|
| |
This avoids some dead code warnings when building without send-control-msg.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Apparently 1.68 now warns when you call into_iter() on something
that's already an iterator. Fair enough. Let's stop doing that.
|
| | |
|
| |
|
|
|
|
|
| |
(I found "user request" in one place, and fixed that. I am not
currently going to try to unify "control message" and "meta message"
since both terms are misleading and we already have TODOs to try to
merge them into a third better term.)
|
| |
|
|
|
| |
This way we don't need to worry about race conditions that happen if
the caller thinks that the handler is installed before it really is.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This new function combines "sending a message" and "accepting
replies in a stream" into a single call, so that there is no gap
between when the message is sent and the replies are available.
There are a number of compromises here, in order to avoid API
proliferation. I've tried to contain them as best I can.
See comments for additional design discussion.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now, the MetaCellHandler is responsible for consuming the messages
it gets, and reporting status to whatever task is waiting for a
status message.
Additionally, the MetaCellHandler can decide to remain installed or
shut down the circuit after a successful message. (Previously, it
could only uninstall itself on success and kill the circuit on
failure.)
These changes will enable MetaCellHandlers to be used as the basis
for handling more kinds of message.
(There is some moved and reformatted code here; you may want to
review it with `git {diff or show} --color-moved -b`.)
|
| | |
|
| | |
|
| |
|
|
| |
Fixes #756
|
| | |
|
| |
|
|
| |
It can now indicate _any_ cell that means we can forget about a stream.
|
| |
|
|
|
|
|
|
|
|
| |
This change makes sure that open streams and half-closed streams
have the same stream-type-dependent state machines with respect to
which cells are acceptable.
Fixes #774.
Fixes #769.
|
| |
|
|
|
|
|
|
| |
The role of CmdChecker is to verify that messages are arriving at
the appropriate sequence on a stream, with respect to the other
messages that have been received. Once the stream becomes
half-closed, the CmdChecker is also in charge of consuming incoming
messages on the stream and making sure that they are well-formed.
|
| | |
|
| | |
|
| |
|
|
|
| |
This closes #525, and ensures, at last, that we don't parse any
message that we wouldn't accept.
|
| |
|
|
|
|
| |
This includes a partial solution for #769, but also turned up
another bug (#774) while I was working on it. I'll close them both
once I have a real solution.
|
| |
|
|
|
|
|
| |
If the meta handler reports an error, then the circuit has violated
its protocol, and needs to be shut down.
Fixes #773.
|
| | |
|
| |
|
|
|
| |
In general, we want to avoid parsing these cells until we are
fairly sure that they are something we would accept.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We now manipulate raw relay cell bodies as (an alias for)
`Box<[u8;509]>` rather than as (an alias for) `[u8;509]`. This
enables us to do much less copying. It will become more important
soon, as we defer parsing relay cell bodies even longer.
Related to #7.
We also use SliceWriter to avoid allocating a Vec<> for every relay
message we want to encode, and instead encode directly into the
cell.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Unlike C tor, we treat unrecognized commands as reason to kill off
the connection entirely. That's fine; if we need to add an
unrecognized command in the future, we can use VERSIONS to negotiate
it.
Also, if someday we want this code to support relay channels as
well, we can use some type trickery to have that work too.
|