summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Parsing, encoding, and serde for RelayId.Nick Mathewson2022-08-103-5/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-105-2/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-2/+6
| | | | | | | | | | | | | | | | | | | | 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.
* | / Fix typosDimitris Apostolou2022-08-011-1/+1
| |/ |/|
* | 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 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
| |
* | Several typo fixes from `typos`.Nick Mathewson2022-07-272-2/+2
| |
* | Fix a rustdoc link in tor-netdir.Nick Mathewson2022-07-261-1/+1
|/
* 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-263-6/+33
| | | | | | 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.
* CircMgr: Update to new NetDirProvider APINick Mathewson2022-07-261-8/+7
| | | | | Everything here wants a timely directory, except that it is okay to build timeout-testing circuits with a stale one.
* ChanMgr: Only update parameters from a timely directory.Nick Mathewson2022-07-261-2/+2
|
* GuardMgr: Update to use new NetDirProvider API.Nick Mathewson2022-07-262-4/+4
|
* Remove unused DirMgr::netdir method, make opt_netdir private.Nick Mathewson2022-07-262-11/+2
|
* Add new APIs to NetDirProvider to better support timeliness.Nick Mathewson2022-07-265-6/+105
| | | | | | | | | | | | | | | | | Over the years we've found that most callers who want a netdir want what C Tor calls a "reasonably live" network directory: One that is not expired by too much, or too far in the future. But a few want a _strictly_ live directory: one that says it is valid now, with no tolerances. And a few want _any_ directory, no matter how expired it is. This commit adds net methods to NetDirProvider to provide these directories. I think that most use cases will want to explicitly think about what kind of directory they want, so I've made `netdir` the simplest method. I might remove `timely_netdir` by the end of this branch; see TODO comments. Part of #518.
* Merge branch 'ticket_503' into 'main'eta2022-07-258-15/+33
|\ | | | | | | | | | | | | Rename DirSkewTolerance to DirTolerance, download_tolerance to dir_tolerance Closes #503 See merge request tpo/core/arti!638
| * Rename download_tolerance to directory_toleranceNick Mathewson2022-07-224-5/+15
| | | | | | | | Closes #503.
| * Rename DirSkewTolerance to DirToleranceNick Mathewson2022-07-226-11/+19
| | | | | | | | | | | | This name is more accurate because we aren't only dealing with clock skew here: we're also trying to tolerate the case where the authorities fail to reach consensus for a while.
* | use Ed25519 identity instead of PublicKey in tor-cert::rsatrinity-1686a2022-07-251-2/+2
| |
* | fix nighly clippytrinity-1686a2022-07-235-14/+9
| |
* | change usage of PublicKey to Ed25519 in tor-certtrinity-1686a2022-07-239-43/+43
| | | | | | | | and propagate to other affected crates
* | change check_key to take a Option<&_> instead of &Option<_>trinity-1686a2022-07-238-12/+13
| |
* | Fix compilation of EstablishInto encoding.Nick Mathewson2022-07-221-2/+3
| | | | | | | | It was based on the old `Writeable` API.
* | Merge branch 'hs-cells' into 'main'eta2022-07-224-1/+89
|\ \ | |/ |/| | | | | Implement ESTABLISH_INTRO relay cell See merge request tpo/core/arti!626
| * Implement ESTABLISH_INTRO relay cellYuan Lyu2022-07-184-1/+89
| |
* | arti-client: Split "Persist" into setup and access variants.Nick Mathewson2022-07-212-5/+16
| |
* | arti_client: turn "Proto" error into StreamFailed.Nick Mathewson2022-07-212-6/+22
| |
* | arti_client: Split DirMgr error into useful types.Nick Mathewson2022-07-213-6/+15
| |
* | arti-client: minor edits in error messages and commentsNick Mathewson2022-07-211-17/+20
| |
* | Also downgrade serde_with: Version 2.0 requires Rust 1.60Nick Mathewson2022-07-201-1/+1
| |
* | Downgrade phf back to 0.10Nick Mathewson2022-07-201-1/+1
| | | | | | | | | | It turns out that phf 0.11 depends on Rust 1.60, which is above our MSRV.