arti/crates
Nick Mathewson 2d4507ff35 Final (?) API revisions for tor-linkspec
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<&keytype>,
  * 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.
2022-08-10 10:39:37 -04:00
..
arti Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
arti-bench Bump minor version on crates with deps with breaking changes. 2022-08-01 09:49:13 -04:00
arti-client Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
arti-config Increment versions of crates with trivial changes only. 2022-06-24 11:43:02 -04:00
arti-hyper Bump minor version on crates with deps with breaking changes. 2022-08-01 09:49:13 -04:00
arti-testing Bump minor version on crates with deps with breaking changes. 2022-08-01 09:49:13 -04:00
caret Increment versions of crates with trivial changes only. 2022-06-24 11:43:02 -04:00
fs-mistrust Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
retry-error Increment versions of crates with trivial changes only. 2022-06-24 11:43:02 -04:00
safelog Manually bump the patch version on safelog. 2022-08-01 10:01:03 -04:00
tor-basic-utils Bump patch versions on crates that have new APIs. 2022-08-01 09:56:29 -04:00
tor-bytes Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
tor-cell Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
tor-cert Fix typos 2022-08-01 23:55:33 +03:00
tor-chanmgr Final (?) API revisions for tor-linkspec 2022-08-10 10:39:37 -04:00
tor-checkable Bump crate and dependency versions. 2022-06-24 12:00:22 -04:00
tor-circmgr Final (?) API revisions for tor-linkspec 2022-08-10 10:39:37 -04:00
tor-config Bump patch versions on crates that have new APIs. 2022-08-01 09:56:29 -04:00
tor-consdiff Bump crate and dependency versions. 2022-06-24 12:00:22 -04:00
tor-dirclient Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
tor-dirmgr Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
tor-error Bump crate and dependency versions. 2022-06-24 12:00:22 -04:00
tor-events Increment versions of crates with trivial changes only. 2022-06-24 11:43:02 -04:00
tor-guardmgr Final (?) API revisions for tor-linkspec 2022-08-10 10:39:37 -04:00
tor-linkspec Final (?) API revisions for tor-linkspec 2022-08-10 10:39:37 -04:00
tor-llcrypto Define a constant for ED25519 identity length. 2022-08-10 10:39:36 -04:00
tor-netdir Final (?) API revisions for tor-linkspec 2022-08-10 10:39:37 -04:00
tor-netdoc Bump patch versions on crates that have new APIs. 2022-08-01 09:56:29 -04:00
tor-persist Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
tor-proto Final (?) API revisions for tor-linkspec 2022-08-10 10:39:37 -04:00
tor-protover Increment versions of crates with trivial changes only. 2022-06-24 11:43:02 -04:00
tor-rtcompat Remove semver.md files now that 0.5.0 is out 2022-06-24 13:31:38 -04:00
tor-rtmock Bump crate and dependency versions. 2022-06-24 12:00:22 -04:00
tor-socksproto Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
tor-units Bump crate and dependency versions. 2022-06-24 12:00:22 -04:00