<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src/util, branch arti-v1.1.13</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.13</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v1.1.13'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2023-08-23T09:34:00Z</updated>
<entry>
<title>Run maint/add_warning to add lint block everywhere</title>
<updated>2023-08-23T09:34:00Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-08-22T14:28:12Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=42df88d6bf6dbb460d2e5e1cd4838aafaffbe9ac'/>
<id>urn:sha1:42df88d6bf6dbb460d2e5e1cd4838aafaffbe9ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-proto: Add a helper for adding a stream entry with a specific stream ID.</title>
<updated>2023-08-03T15:25:46Z</updated>
<author>
<name>Gabriela Moldovan</name>
<email>gabi@torproject.org</email>
</author>
<published>2023-07-28T19:33:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=18b01f94cc64a67d486ef4ae1f7995843e759b2c'/>
<id>urn:sha1:18b01f94cc64a67d486ef4ae1f7995843e759b2c</id>
<content type='text'>
This adds a new `add_ent_with_id` function for adding a new entry to the
`StreamMap`. The existing `add_ent` function auto-generates a new stream
ID, which is not good if we're a hidden service, as stream IDs are
supposed to be chosen by the OP (client). When accepting a new stream,
services, exit relays, and dir auths need to use the stream ID received
in the BEGIN cell (instead of generating a new stream ID).
</content>
</entry>
<entry>
<title>Run maint/add_warning to actually apply new lint allows</title>
<updated>2023-07-10T12:49:51Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2023-07-10T11:19:32Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=473447a82e099fd52a674c28f5bc24b3e05208c0'/>
<id>urn:sha1:473447a82e099fd52a674c28f5bc24b3e05208c0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Lower tor-proto::util::ct::lookup to tor-llcrypto</title>
<updated>2023-06-16T16:24:05Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-06-14T16:17:39Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=25db56777c0042a93daa7b37fc4a31e27181dc7d'/>
<id>urn:sha1:25db56777c0042a93daa7b37fc4a31e27181dc7d</id>
<content type='text'>
This is mostly code movement; you may want to review it with
`--color-moved`.

I'm doing this so we can also use the function in netdoc for
looking up hsdesc authentication.
</content>
</entry>
<entry>
<title>Allow clippy::unchecked_duration_subtraction in tests</title>
<updated>2023-01-27T13:28:02Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2023-01-27T13:01:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a6dd92843edf2bd4c58de62a0d562921e4191ada'/>
<id>urn:sha1:a6dd92843edf2bd4c58de62a0d562921e4191ada</id>
<content type='text'>
This panics on error, and we're fine with a panic on misbehavior in
tests.
</content>
</entry>
<entry>
<title>test lint blocks: Add many many automatically</title>
<updated>2022-12-12T18:00:30Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-12-12T17:58:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=125a455bdcca841931f33f83f206e57637ae85c4'/>
<id>urn:sha1:125a455bdcca841931f33f83f206e57637ae85c4</id>
<content type='text'>
This is precisely the result of running the rune in
maint/adhoc-add-lint-blocks.
</content>
</entry>
<entry>
<title>Final (?) API revisions for tor-linkspec</title>
<updated>2022-08-10T14:39:37Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-08-05T15:47:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2d4507ff35f8e8cf874c81d3754804b2c20f31aa'/>
<id>urn:sha1:2d4507ff35f8e8cf874c81d3754804b2c20f31aa</id>
<content type='text'>
With this change, each individual identity type becomes optional.
The functions that expose them unconditionally are now in a "legacy"
trait that only some downstream types are expected to implement.

There are new convenience APIs in HasRelayIds:
  * to return Option&lt;&amp;keytype&gt;,
  * to see if one identity-set contains another.

This commit will break several downstream crates!  For the
reviewer's convenience, I will put the fixes for those crates into a
series of squash! commits on this one.

tor-netdir
----------

Revise tor-netdir to accept optional identities.  This required some
caveats and workarounds about the cases where we have to deal with a
key type that the tor-netdir code does not currently recognize at
all.  If we start to add more identity types in the future, we may
well want more internal indices in this code.

tor-proto
---------

In order to make tor-proto support optional identities, there were
fewer changes than I thought.  Some "check" functions needed to start
looking at "all the ids we want" rather than at "the two known IDs";
they also needed to accommodate that case where we don't have an ID
that we demand.

This change will also help with bridges, since we want to be able to
connect to a bridge without knowing all of its IDs up front.

The protocol currently _requires_ the two current ID types in some
places. To deal with that, I added a new `MissingId` error.

I also removed a couple of unconditional identity accessors for
chanmgr; code should use `target().identity(...)` instead.

tor-chanmgr
-----------

This is an incomplete conversion: it does not at all handle channel
targets without Ed25519 identities yet.  It still uses those
identities to index its internal map from identity to channel; but
it gives a new `MissingId` error type if it's given a channel target
that doesn't have one.

We'll want to revise the map type again down the road when we
implement bridges, but I'd rather not step on the channel-padding
work in progress right now.

tor-guardmgr
------------

This change is mostly a matter of constructing owned identity types
more sensibly, rather than unwrapping them directly.

There are some places marked with TODOs where we still depend on
particular identity types, because of how the directory protocol
works.  This will need revisiting when we add bridge support here.

tor-circmgr
-----------

These changes are just relatively simple API changes in the tests.
</content>
</entry>
<entry>
<title>tor-proto: Stop using write_infallible in handshake code.</title>
<updated>2022-07-11T15:18:51Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-07-11T15:04:27Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=fbb6484025ac024642afbeef6734d88e35210673'/>
<id>urn:sha1:fbb6484025ac024642afbeef6734d88e35210673</id>
<content type='text'>
This change was a bit annoying, since most of this code _can't_ fail,
and so the only reasonable response is to wrap the input in an
internal error... except for one case where we're actually encoding
a caller-provided message, so we _do_ want to wrap the EncodeError
from tor_bytes.
</content>
</entry>
<entry>
<title>tor-proto: split and elaborate tor_bytes::Error instances</title>
<updated>2022-06-23T19:42:45Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-06-23T19:42:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=38004a4f4dd3aa99b81b6585039e81dc77c17f32'/>
<id>urn:sha1:38004a4f4dd3aa99b81b6585039e81dc77c17f32</id>
<content type='text'>
Some of these were for decoding particular objects (we now say
what kind of objects), and some were unrelated tor_cert errors that
for some reason we had shoved into a tor_bytes::Error.

There is now a separate tor_cert::CertError type, independent from
tor_cert's use of `tor_bytes::Error` for parsing errors.
</content>
</entry>
<entry>
<title>tor-proto: Split CellErr based on activity.</title>
<updated>2022-06-23T18:59:52Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-06-23T18:59:52Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=35b7b8a47ad96f5eee032fab7900b3b29bf2fa73'/>
<id>urn:sha1:35b7b8a47ad96f5eee032fab7900b3b29bf2fa73</id>
<content type='text'>
Failing to encode is fundamentally different from failing to
decode. We now treat those separately, and describe _what_ we failed
to encode or decode.
</content>
</entry>
</feed>
