| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
- `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
|
| |
|
|
| |
(This TODO dates back to the point before we had sessions.)
|
| | |
|
| |
|
|
|
| |
Nothing uses it; its role in negotiation has been replaced
by the connect-point design.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
The current cancel code is prone to deadlock, so the easiest way to
solve it appears to be making cancel requests themselves
uncancellable.
I've included a test to verify the behavior; previously, this test
caused a deadlock.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We don't want to call this "unix path" anywhere, since it
corresponds to _any_ case where the ability to negotiate a
successful connection means that the client is authorized.
We also don't want to call it "none": The authentication
is inherent to the connection, not nonexistent.
|
| |
|
|
|
|
|
|
|
|
| |
Previously participants in the cookie protocol only bound the peer
nonce in their MACs. With this change, they bind both nonces.
This change is _probably_ not necessary for security, but it can't
hurt. It follows a general principle that Adam Langley told me a
long time ago: you won't regret binding more, but you might regret
binding less.
|
| |
|
|
|
| |
Since this is a secret value, it's probably best not to copy it
all over the place.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Now that we have a solid idea of how connections happen,
it's clear we won't need to enable this negotiation mechanism.
|
| | |
|
| |
|
|
|
|
| |
Previous documentation was more-or-less meant for the Arti developer
only. This new documentation is intended for actual users of RPC
functionality. It's meant to be extracted with `maint/rpc-doc-tool`.
|
| |
|
|
|
| |
It is no longer necessary to say, for every RPC method,
that its error type is RpcError.
|
| |
|
|
|
|
|
|
| |
Formerly we used a Box. That was okay at first, but now that we
want RPC methods to be able to invoke other RPC methods, we don't
want the Invocable methods to have to consume the Context.
This requires that Context become Sync.
|
| |
|
|
|
|
|
|
| |
This is needed so that we can cast special methods' return types
properly.
I wish I could make this optional, but Rust doesn't allow
defaulting an associated type.
|
| | |
|
| |
|
|
|
| |
These are no longer needed, since they are inferred from the types
of the functions.
|
| | |
|
| |
|
|
|
|
|
|
| |
This will be called _static_ to make it clear that it registers the
method statically, so you don't need to install it at runtime.
After a bit more work, there will be a separate macro that declares
an installer function.
|
| |
|
|
|
|
|
|
|
| |
We don't actually need this to be a trait; we just need
methods and objects to have a `CONST_TYPE_ID_` if they want to
participate in the inventory-based method registry.
Removing this trait makes it much simpler to declare methods and
objects.
|
| |
|
|
|
|
| |
This simplifies our implementation logic in a few places,
and simplifies our invocation syntax greatly. There are a few
infelicities, noted in `TODO RPC` comments.
|
| |
|
|
|
|
| |
This will later let us tell the session-creation function
how the authentication occurred, which will let it decide
what privileges to provide.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Formerly, every time we wanted to launch a new connection, we had
to give the RpcMgr a TorClient. The connection would hold that
TorClient until a session was authenticated, and then would wrap
it in a Session and put it in the object map.
Now, the RpcMgr holds a Box<dyn Fn()...> that knows how to
create Sessions. When a connection is authenticated, it
asks the Mgr to make it a new session. This lets us make it
clearer that the TorClient simply can't be given out until the
connection is authenticated. Later, it will let us create
more types of Session objects under more complicated rules.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This will make it easier to change the semantics of what exactly we
return, whether it has to be/contain a client, whether you can use
it to look up all the live objects, &etc.
|
| | |
|
| | |
|
| |
|