summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * netdir: remove long-unused missing_descriptor_for codeNick Mathewson2022-08-102-23/+2
| | | |
| | | * tor-netdir: Remove or hide some no-longer-used accessors.Nick Mathewson2022-08-101-29/+13
| | | | | | | | | | | | | | | | | | | | The hidden ones are only used to implement higher-level accessors; the others are not used at all.
| | | * tor-netdir: Collapse by_id and by_relay_id into a single fn.Nick Mathewson2022-08-105-58/+71
| | | | | | | | | | | | | | | | | | | | | | | | There are some downstream changes required for this to work, but they are all just unit tests that could no longer infer the type of an Ed25519 key.
| | | * Final (?) API revisions for tor-linkspecNick Mathewson2022-08-1022-223/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | * linkspec: Add more accessors (some internal) for ids.Nick Mathewson2022-08-101-0/+68
| | | | | | | | | | | | | | | | These will all be used shortly.
| | | * Remove get_ed_identity_key as unused.Nick Mathewson2022-08-101-23/+0
| | | |
| | | * Introduce a RelayIdSet and use it in place of HashSet<RelayId>.Nick Mathewson2022-08-107-20/+167
| | | | | | | | | | | | | | | | | | | | This makes lookups a little more efficient. I do with that HashSet just supported this use-case, but for now this seems our best option.
| | | * Teach guard restrictions about RelayId.Nick Mathewson2022-08-105-16/+60
| | | | | | | | | | | | | | | | | | | | This implementation is (sadly) too copy-heavy or now, because HashSet<RelayId> can't be indexed with RelayIdRef.
| | | * Parsing, encoding, and serde for RelayId.Nick Mathewson2022-08-104-5/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The formats used here are backward-compatible with those used by C tor and those used elsewhere in our code. We need a way to encode _both_ current kinds of identities as a string that tells you what kind of ID they are. Traditionally we have used hexadecimal, sometimes with a $, for RSA ids, and we have used base64 for Ed25519 IDs. We also introduce a new forward-compatible format for new identity keys in the future. (The new format is the key identity type, a colon, and the id encoded as base64.) We will use this new format _only_ when we need to encode identities in a way where it would be otherwise unclear what kind of key we are dealing with.
| | | * Use accessors in two places where tests look at specific keys.Nick Mathewson2022-08-102-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | (It's safe to require these specific keys, since we constructed the objects for testing, and we know for certain that they contain given keys.)
| | | * Add a set of Identity-related types and accessors.Nick Mathewson2022-08-106-2/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I wonder if these types are correct. I think it makes sense to have a Ref type like this, rather than just using `&RelayId`, but it doesn't seems that I can make `RelayId` and `RelayIdRef` implement Borrow and ToOwned for one another, so maybe I've messed up.
| | | * Define a constant for ED25519 identity length.Nick Mathewson2022-08-102-3/+8
| | | |
| | | * guardmgr: Avoid a case of using HasRelayIds key methods.Nick Mathewson2022-08-021-1/+1
| | | |
| | | * netdir: Add and use a new ids_listed() function.Nick Mathewson2022-08-022-1/+10
| | | |
| | | * Avoid a simple usage of ed_identity() in circmgr testsNick Mathewson2022-08-021-2/+1
| | | |
| | | * Introduce HasRelayIds::same_relay_ids.Nick Mathewson2022-08-026-23/+33
| | | | | | | | | | | | | | | | | | | | This method tells if two HasRelayIds contain exactly the same set of Relay identities, and is generally useful for debugging.
| | | * guardmgr: Change APIs that used to take IDs.Nick Mathewson2022-08-023-24/+19
| | | | | | | | | | | | | | | | These are the other inspiration for #428.
| | | * guardmgr: Replace IdPair with RelayIdsNick Mathewson2022-08-024-30/+31
| | | | | | | | | | | | | | | | I believe that this was the original motivation behind #428.
| | | * Implement serde traits on RelayIds.Nick Mathewson2022-08-023-2/+7
| | | | | | | | | | | | | | | | | | | | This will allow RelayIds to replace IdPair in tor-guardmgr. (The fields are named accordingly with `serde(rename)`.)
| | | * netdir: add an accessor that takes a HasRelayIds.Nick Mathewson2022-08-021-1/+12
| | | |
| | | * tor-linkspec: Refactor out traits to represent a relay's ID set.Nick Mathewson2022-08-0218-48/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want the set of identities supported by a relay to be extensible in the future with minimal fuss; we'd also like to make working with these ID sets more convenient. To handle that, this commit adds a new trait for "Something that has the same IDs as a relay" and a new object for "an owned representation of a relay's IDs." This commit introduces a similar trait for "Something with a list of SocketAddr, like a relay has." There's no owned equivelent for that, since Vec<SocketAddr> is already a thing. Closes #428.
| | | * Remove some testing-only reimplementations of OwnedChanTarget.Nick Mathewson2022-08-023-82/+12
| |_|/ |/| | | | | | | | These predate OwnedChanTarget, and are no longer needed.
* | | Merge branch 'typos' into 'main'Ian Jackson2022-08-022-2/+2
|\ \ \ | |_|/ |/| | | | | | | | Fix typos See merge request tpo/core/arti!656
| * | Fix typosDimitris Apostolou2022-08-012-2/+2
|/ /
* | CHANGELOG: Add links to latest changelog.arti-v0.6.0Nick Mathewson2022-08-011-6/+56
| |
* | Update Cargo.lock based on version bumps.Nick Mathewson2022-08-011-24/+24
| |
* | Now that versions have bumped, remove semver.md files.Nick Mathewson2022-08-0117-27/+0
| |
* | Manually bump the patch version on safelog.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | The changes on safelog do not affect its APIs or behavior, so there is no need to adjust any dependencies.
* | Bump patch versions on crates that have new APIs.Nick Mathewson2022-08-0116-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Do _not_ bump the dependency versions on crates that have had no changes since arti 0.0.5, since those crates do not depend on the new APIs. ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p tor-llcrypto --bump patch git restore crates/tor-checkable git restore crates/tor-consdiff git restore crates/tor-rtmock ```
* | Bump minor version on crates with deps with breaking changes.Nick Mathewson2022-08-0114-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This performs the transitive closure of the last operation: everything that depends on a crate with a breaking change gets the version which it depends on bumped. ``` cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor cargo set-version -p tor-config --bump minor ```
* | Bump minor versions on all crates that have had breaking changes.Nick Mathewson2022-08-0121-71/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with these commands: ``` cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti --bump minor ```
* | Update CHANGELOG for !652.Nick Mathewson2022-08-011-0/+4
| |
* | Merge branch 'fs-mistrust-ios' into 'main'Nick Mathewson2022-08-016-18/+38
|\ \ | | | | | | | | | | | | | | | | | | fix compilation and execution on iOS Closes #519 See merge request tpo/core/arti!652
| * | update semver status filetrinity-1686a2022-07-301-0/+1
| | |
| * | fix runtime issues on iostrinity-1686a2022-07-303-10/+17
| | |
| * | remove dependancy 'users' on iOStrinity-1686a2022-07-303-10/+22
|/ /
* | Merge branch 's101_metrics' into 'main'Nick Mathewson2022-07-271-0/+213
|\ \ | | | | | | | | | | | | Checkpoint metrics and discussions on Sponsor 101 metrics See merge request tpo/core/arti!639
| * | Checkpoint metrics and discussions on Sponsor 101 metricsNick Mathewson2022-07-221-0/+213
| | | | | | | | | | | | | | | | | | | | | These metrics are primarily concerned about heap usage and download size. I've worked on them for our latest report, and I want to check them in someplace so we don't forget them the next time we want to run these.
* | | Merge branch 'typos_20220727' into 'main'Nick Mathewson2022-07-273-3/+3
|\ \ \ | | | | | | | | | | | | | | | | Several typo fixes from `typos`. See merge request tpo/core/arti!650
| * | | Several typo fixes from `typos`.Nick Mathewson2022-07-273-3/+3
| | | |
* | | | Draft changelog for 0.6.0 (so far)Nick Mathewson2022-07-271-1/+96
|/ / /
* | | Merge branch 'update_20220727' into 'main'Nick Mathewson2022-07-271-90/+58
|\ \ \ | | | | | | | | | | | | | | | | Run "cargo update" in preparation for next week's release. See merge request tpo/core/arti!649
| * | | Run "cargo update" in preparation for next week's release.Nick Mathewson2022-07-271-90/+58
|/ / /
* | | Merge branch 'rustdoc_fix_2022_07_26' into 'main'Nick Mathewson2022-07-261-1/+1
|\ \ \ | |_|/ |/| | | | | | | | Fix a rustdoc link in tor-netdir. See merge request tpo/core/arti!647
| * | Fix a rustdoc link in tor-netdir.Nick Mathewson2022-07-261-1/+1
|/ /
* | Merge branch 'netdir_api' into 'main'Ian Jackson2022-07-2617-72/+157
|\ \ | | | | | | | | | | | | | | | | | | Refactor NetDirProvider APIs to better support timeliness. Closes #518 See merge request tpo/core/arti!642
| * | tor-dirmgr: Remove opt_netdir entirely.Nick Mathewson2022-07-263-12/+9
| | | | | | | | | | | | Its existence tended to hide bugs, and was just asking for trouble.
| * | CircMgr: Remove directory liveness testing.Nick Mathewson2022-07-262-23/+2
| | |
| * | tor-netdir: Remove latest_netdir method.Nick Mathewson2022-07-262-10/+1
| | |
| * | Update arti-client to new NetDirProvider API.Nick Mathewson2022-07-264-6/+35
| | | | | | | | | | | | | | | | | | This allows us to give better errors in the case where bootstrapping succeeds at first, but fails thereafter for long enough to make our directory expire.