<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src/channel/handshake.rs, branch arti-v2.5.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-06-29T13:52:56Z</updated>
<entry>
<title>proto: Pass an IncomingStreamRequestFilter factory to the create handler</title>
<updated>2026-06-29T13:52:56Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2026-06-12T11:06:31Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=6b1881af1785c61022a320c40399406e0682d37a'/>
<id>urn:sha1:6b1881af1785c61022a320c40399406e0682d37a</id>
<content type='text'>
This implements what we discussed in
`doc/dev/notes/relay-streams.md` (lines 218-234):

&gt; Currently, to allow incoming stream requests on a circuit,
&gt; you first need to call `RelayCirc::allow_stream_requests()`
&gt; to install a `CmdChecker` and `IncomingStreamRequestFilter`.
&gt; This is not ideal, because `allow_stream_requests()` will need to be
&gt; called unconditionally, on each `RelayCirc`,
&gt; right after it's created in the `CreateHandler` impl
&gt; (which in turn, would mean making `handle_create()` async too,
&gt; because `allow_stream_requests()` is async, which wouldn't be great).
&gt;
&gt; So, the first step here is to rework the `RelayCirc` API to make relay circuits
&gt; be constructable with a list of allowed `RelayCmd`s and `IncomingStreamRequestFilter`
&gt; from the get-go ([#2582]), and to get rid of `allow_stream_requests()`,
&gt; which will enable the `CREATE*` handler to remain non-`async`.
&gt;
&gt; In any case, the `CREATE*` handler will still require some changes,
&gt; because it needs to be initialized with an `IncomingStreamRequestFilter`,

I am not sure using an `IncomingStreamRequestFilter` "factory" is
necessarily the right approach here, but the circuit `Reactor`'s
constructor needs to take an `IncomingStreamRequestFilter`, and
`IncomingStreamRequestFilter` is not `Clone` (and FWIW, I think it's
better if we don't make it `Clone`).

One obvious limitation is that the `IncomingStreamRequestFilter` of the
circuit reactor is fixed for the entire lifetime of the circuit.
In practice, I don't think this is going to be a problem,
because the arti-relay `IncomingStreamRequestFilter` is only going
be used for

  * preventing single-hop exit streams
  * per-circuit rate-limiting.

Both of these checks will require the filter to have access to a recent
`NetDir`, which is straightforward if the filter has an Arc&lt;dyn
NetDirProvider&gt; (as mentioned in doc/dev/notes/relay-streams.md,
`NetDirProvider` has a handy non-async `timely_netdir()` function we can
use). And since these checks are based on consensus params, we don't
really need to ever update an already-built circuit with a new
`IncomingStreamRequestFilter` (because all `IncomingStreamRequestFilter`
will have the ability to obtain a fresh `NetDir` as needed).

Nevertheless, I left a TODO about this, because I expect this type to
change once we figure out all the other pieces needed for #1448.
</content>
</entry>
<entry>
<title>tor-proto: Remove a now-redundant .iter() in a call to iter_join</title>
<updated>2026-06-11T12:27:27Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-10T16:30:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=27ad25a4ed567244186960ae315a8112f35c3bdb'/>
<id>urn:sha1:27ad25a4ed567244186960ae315a8112f35c3bdb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>proto: add regression tests for verify_link_auth_cert</title>
<updated>2026-06-02T16:42:08Z</updated>
<author>
<name>moumenalaoui</name>
<email>moumenalaoui@proton.me</email>
</author>
<published>2026-04-29T18:18:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=20405fb76d32a4a118458bbdc766570396dc9d07'/>
<id>urn:sha1:20405fb76d32a4a118458bbdc766570396dc9d07</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Fix inverted cert sig and AUTHENTICATE compare</title>
<updated>2026-06-02T16:42:05Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-06-02T14:49:37Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7f2ec77cd443f9b9b6544d63ab513673105843d6'/>
<id>urn:sha1:7f2ec77cd443f9b9b6544d63ab513673105843d6</id>
<content type='text'>
Missed at review and no unit tests at the time catched those. The next
commit has a unit tests to make sure these checks are now valid.

Fixes #2501
Fixes #2502

Special thanks to Moumen Alaoui for reporting this early!

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>relay: Modify RelayNtorKeys to use a constructor</title>
<updated>2026-04-21T18:01:27Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-04-21T14:27:41Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=e84f73d564b71c386b4e18020da0093839a8874a'/>
<id>urn:sha1:e84f73d564b71c386b4e18020da0093839a8874a</id>
<content type='text'>
Because of the sorting requirement and the fact that a `KeyMgr` can have
multiple Ntor keys, the caller now explicitly extract the two Ntor keys
it wants from the `KeyMgr` and then creates a `RelayNtorKeys` object
with them.

Future changes (#2495) will move this into a view and warn if there are
more than 2 keys.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Make the CreateRequestHandler::new() take the ntor keys</title>
<updated>2026-04-21T18:01:27Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-04-16T17:00:00Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9c2259efabcd59a35b4a6d7422d0ee927b21ff98'/>
<id>urn:sha1:9c2259efabcd59a35b4a6d7422d0ee927b21ff98</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Remove unused imports in unit tests</title>
<updated>2026-04-14T20:10:18Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-04-14T19:49:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=8b23a661bf141312d6dc102cdff08a7e858a51b2'/>
<id>urn:sha1:8b23a661bf141312d6dc102cdff08a7e858a51b2</id>
<content type='text'>
Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Fix relay unit tests with new CreateRequestHandler</title>
<updated>2026-04-14T20:10:18Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-04-14T19:45:59Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=f885b7be3994eeb972aa78d1c84792f43c8c85aa'/>
<id>urn:sha1:f885b7be3994eeb972aa78d1c84792f43c8c85aa</id>
<content type='text'>
The CreateRequestHandler was introduced prior to the relay handshake
unit tests so fix them now that we have a way to build one.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Add channel relay handshake unit tests</title>
<updated>2026-04-14T18:38:50Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-04-01T16:44:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=93a2ba3cfbfa1c8f623e62244248c7d418174651'/>
<id>urn:sha1:93a2ba3cfbfa1c8f623e62244248c7d418174651</id>
<content type='text'>
Instead of copying the client unit tests into the channel module, just
make both current unit tests run on a client and relay handshake.

This required a bit of trickery with type HandshakeConnectFn but works
out in the end.

It also adds the RelayMsgBuf that wraps a MsgBuf in order to implement
CertifiedConn which is very relay only.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
<entry>
<title>proto: Move test certs module at the top</title>
<updated>2026-04-14T18:38:50Z</updated>
<author>
<name>David Goulet</name>
<email>dgoulet@torproject.org</email>
</author>
<published>2026-03-25T18:18:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=c68cc3d556085aeb87f214964722fcac385e33df'/>
<id>urn:sha1:c68cc3d556085aeb87f214964722fcac385e33df</id>
<content type='text'>
Just for mental sanity to have all const at the same place and easily
readable.

No behavior change.

Signed-off-by: David Goulet &lt;dgoulet@torproject.org&gt;
</content>
</entry>
</feed>
