Nick Mathewson
8af41bd65f
Use accessors in two places where tests look at specific keys.
...
(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.)
2022-08-10 10:39:36 -04:00
Nick Mathewson
9d4729a072
Add a set of Identity-related types and accessors.
...
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.
2022-08-10 10:39:36 -04:00
Nick Mathewson
62850a24c9
Define a constant for ED25519 identity length.
2022-08-10 10:39:36 -04:00
Nick Mathewson
6ee9535126
guardmgr: Avoid a case of using HasRelayIds key methods.
2022-08-02 14:33:32 -04:00
Nick Mathewson
0bfc92ce8e
netdir: Add and use a new ids_listed() function.
2022-08-02 14:32:57 -04:00
Nick Mathewson
c291d86311
Avoid a simple usage of ed_identity() in circmgr tests
2022-08-02 14:27:47 -04:00
Nick Mathewson
fdfc5f29e3
Introduce HasRelayIds::same_relay_ids.
...
This method tells if two HasRelayIds contain exactly the same set of
Relay identities, and is generally useful for debugging.
2022-08-02 14:19:00 -04:00
Nick Mathewson
0e41913a4c
guardmgr: Change APIs that used to take IDs.
...
These are the other inspiration for #428 .
2022-08-02 12:40:57 -04:00
Nick Mathewson
2d32a4602b
guardmgr: Replace IdPair with RelayIds
...
I believe that this was the original motivation behind #428 .
2022-08-02 12:40:57 -04:00
Nick Mathewson
be7cf7a24b
Implement serde traits on RelayIds.
...
This will allow RelayIds to replace IdPair in tor-guardmgr. (The
fields are named accordingly with `serde(rename)`.)
2022-08-02 12:40:55 -04:00
Nick Mathewson
9763d8227b
netdir: add an accessor that takes a HasRelayIds.
2022-08-02 12:40:25 -04:00
Nick Mathewson
b68a3ed5e5
tor-linkspec: Refactor out traits to represent a relay's ID set.
...
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 .
2022-08-02 12:40:23 -04:00
Nick Mathewson
1eb8b02f47
Remove some testing-only reimplementations of OwnedChanTarget.
...
These predate OwnedChanTarget, and are no longer needed.
2022-08-02 12:39:30 -04:00
Ian Jackson
3f2f79f34f
Merge branch 'typos' into 'main'
...
Fix typos
See merge request tpo/core/arti!656
2022-08-02 14:30:06 +00:00
Dimitris Apostolou
5eb45de6f8
Fix typos
2022-08-01 23:55:33 +03:00
Nick Mathewson
826e1c4766
CHANGELOG: Add links to latest changelog.
2022-08-01 10:31:47 -04:00
Nick Mathewson
6d5af26f95
Update Cargo.lock based on version bumps.
2022-08-01 10:17:04 -04:00
Nick Mathewson
b16c042004
Now that versions have bumped, remove semver.md files.
2022-08-01 10:07:12 -04:00
Nick Mathewson
dc67c9864b
Manually bump the patch version on safelog.
...
The changes on safelog do not affect its APIs or behavior, so
there is no need to adjust any dependencies.
2022-08-01 10:01:03 -04:00
Nick Mathewson
859ae4acd0
Bump patch versions on crates that have new APIs.
...
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
```
2022-08-01 09:56:29 -04:00
Nick Mathewson
511cb46997
Bump minor version on crates with deps with breaking changes.
...
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
```
2022-08-01 09:49:13 -04:00
Nick Mathewson
f5dcb98f06
Bump minor versions on all crates that have had breaking changes.
...
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
```
2022-08-01 09:43:09 -04:00
Nick Mathewson
65d39dd5a9
Update CHANGELOG for !652 .
2022-08-01 09:32:17 -04:00
Nick Mathewson
137a42c5c2
Merge branch 'fs-mistrust-ios' into 'main'
...
fix compilation and execution on iOS
Closes #519
See merge request tpo/core/arti!652
2022-08-01 13:29:04 +00:00
trinity-1686a
4f6c23a1da
update semver status file
2022-07-30 15:52:45 +02:00
trinity-1686a
19a71534ec
fix runtime issues on ios
2022-07-30 15:42:37 +02:00
trinity-1686a
68ad22a985
remove dependancy 'users' on iOS
2022-07-30 11:28:03 +02:00
Nick Mathewson
bab36d451d
Merge branch 's101_metrics' into 'main'
...
Checkpoint metrics and discussions on Sponsor 101 metrics
See merge request tpo/core/arti!639
2022-07-27 17:20:45 +00:00
Nick Mathewson
f237836c20
Merge branch 'typos_20220727' into 'main'
...
Several typo fixes from `typos`.
See merge request tpo/core/arti!650
2022-07-27 15:29:36 +00:00
Nick Mathewson
5a5612b824
Draft changelog for 0.6.0 (so far)
2022-07-27 10:48:19 -04:00
Nick Mathewson
dfdcc97858
Several typo fixes from `typos`.
2022-07-27 10:12:32 -04:00
Nick Mathewson
e571bc6c09
Merge branch 'update_20220727' into 'main'
...
Run "cargo update" in preparation for next week's release.
See merge request tpo/core/arti!649
2022-07-27 13:57:59 +00:00
Nick Mathewson
a0b2795e5e
Run "cargo update" in preparation for next week's release.
2022-07-27 09:27:30 -04:00
Nick Mathewson
fad017403b
Merge branch 'rustdoc_fix_2022_07_26' into 'main'
...
Fix a rustdoc link in tor-netdir.
See merge request tpo/core/arti!647
2022-07-26 19:09:16 +00:00
Nick Mathewson
ea8db813ac
Fix a rustdoc link in tor-netdir.
2022-07-26 14:18:18 -04:00
Ian Jackson
422794dee7
Merge branch 'netdir_api' into 'main'
...
Refactor NetDirProvider APIs to better support timeliness.
Closes #518
See merge request tpo/core/arti!642
2022-07-26 10:03:49 +00:00
Nick Mathewson
14cd423630
tor-dirmgr: Remove opt_netdir entirely.
...
Its existence tended to hide bugs, and was just asking for trouble.
2022-07-26 10:41:38 +01:00
Nick Mathewson
8d9e0eb334
CircMgr: Remove directory liveness testing.
2022-07-26 10:41:38 +01:00
Nick Mathewson
241427ea3f
tor-netdir: Remove latest_netdir method.
2022-07-26 10:41:38 +01:00
Nick Mathewson
1f79e1c49b
Update arti-client to new NetDirProvider API.
...
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.
2022-07-26 10:41:38 +01:00
Nick Mathewson
a0c48caa46
CircMgr: Update to new NetDirProvider API
...
Everything here wants a timely directory, except that it is okay
to build timeout-testing circuits with a stale one.
2022-07-26 10:41:06 +01:00
Nick Mathewson
ad577b48f2
ChanMgr: Only update parameters from a timely directory.
2022-07-26 10:41:06 +01:00
Nick Mathewson
0bca4d825c
GuardMgr: Update to use new NetDirProvider API.
2022-07-26 10:41:06 +01:00
Nick Mathewson
de460b0668
Remove unused DirMgr::netdir method, make opt_netdir private.
2022-07-26 10:41:06 +01:00
Nick Mathewson
c39aa5de73
Add new APIs to NetDirProvider to better support timeliness.
...
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 .
2022-07-26 10:40:53 +01:00
eta
7537739a75
Merge branch 'ticket_503' into 'main'
...
Rename DirSkewTolerance to DirTolerance, download_tolerance to dir_tolerance
Closes #503
See merge request tpo/core/arti!638
2022-07-25 20:21:04 +00:00
Nick Mathewson
d1e91be382
Merge branch 'cert-api-improv-bis' into 'main'
...
use Ed25519 identity instead of PublicKey in tor-cert::rsa
Closes #512
See merge request tpo/core/arti!643
2022-07-25 19:25:36 +00:00
trinity-1686a
61eb0c4f35
use Ed25519 identity instead of PublicKey in tor-cert::rsa
2022-07-25 20:46:01 +02:00
Nick Mathewson
04f0ce8ee4
Merge branch 'cert-api-improv' into 'main'
...
change usage of PublicKey to Ed25519 in tor-cert
Closes #512
See merge request tpo/core/arti!641
2022-07-25 13:53:53 +00:00
trinity-1686a
eed8032dbd
fix nighly clippy
2022-07-23 20:25:33 +02:00