Commit Graph

7526 Commits

Author SHA1 Message Date
Nick Mathewson 0bffdf23a4 Upgrade to itertools 0.11.0
The breaking changes here do not seem to affect us.
2023-06-26 09:30:54 -04:00
Ian Jackson 8a707bef85 tor-hsclient: Split out expire_old_data function
As per discussion in
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1290#note_2915679
2023-06-26 13:45:57 +01:00
Nick Mathewson c653a8ce89 netdoc: change a TODO HS about a distinguisher to a NOTE.
(We explicitly do not care if Arti can be distinguished from C tor.)
2023-06-26 08:45:06 -04:00
Nick Mathewson 69dcacd69b netdoc: replace a test TODO with a reference to other tests
The tests called for here already existed.
2023-06-26 08:45:06 -04:00
Nick Mathewson f4a4c11627 proto: Remove support for receiving unauthenticated SENDMEs
We haven't generated these since Tor 0.3.5, which is no longer
supported on the network.

Closes #914.
2023-06-26 08:38:24 -04:00
Ian Jackson cccf6309d8 tor-hsclient: Add a comment about what run_housekeeping does
Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1290#note_2915679
2023-06-26 13:23:41 +01:00
Ian Jackson e588f4be72 tor-hsclient: Add a debug message about task exit
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1290#note_2915678
2023-06-26 13:23:41 +01:00
Gabriela Moldovan b3b4abcf90 keymgr: Document why we need the StdError impl for tor_keymgr::Error. 2023-06-26 13:16:58 +01:00
Gabriela Moldovan a1dbec79bd keymgr: Remove AsRef<dyn StdError> trait bound and unneeded impls.
We don't really need the `AsRef<dyn StdError>` impls if we make
`StdError` a supertrait of `KeystoreError` (and remove the `AsRef<dyn
StdError>` trait bound).
2023-06-26 13:16:58 +01:00
Gabriela Moldovan de0f662fb6 keymgr: Add the file path to SshKeyError context. 2023-06-26 13:16:04 +01:00
Gabriela Moldovan 60036b3cc3 keymgr: Add the path to ArtiNativeKeystoreError Display impl. 2023-06-26 13:16:04 +01:00
Gabriela Moldovan 85305e156f keymgr: Replace Error with Box<dyn KeystoreError>.
Part of #901
2023-06-26 13:16:03 +01:00
Ian Jackson e5e4cf65f7 tor-hsclient: Comment explaining why no launch_background_tasks
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1290#note_2915676
2023-06-26 13:15:22 +01:00
Ian Jackson 09ae0aed4a tor-hsclient: Say we *mustn't* do housekeeping while dormant
This is a change to the API docs, but not to the actual code, since
our call site is in arti-client and tied to netdir fetch,
which *doesn't* happen when dormant.

As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1290#note_2915677
2023-06-26 13:14:17 +01:00
Gabriela Moldovan 4870c2e7d9 keymgr: Add helper for boxing SshKeyError. 2023-06-26 13:13:44 +01:00
Gabriela Moldovan 74f41fd7f3 keymgr: Implement KeystoreError for SshKeyError. 2023-06-26 13:13:43 +01:00
Gabriela Moldovan 165b1060ef keymgr: Add some initial variants to SshKeyError. 2023-06-26 13:13:16 +01:00
Gabriela Moldovan a5b8291ca9 keymgr: Define an error type for the ssh module. 2023-06-26 13:13:16 +01:00
Gabriela Moldovan 158255b827 keymgr: Define an error type for ArtiNativeKeyStore.
Part of #901
2023-06-26 13:13:16 +01:00
Gabriela Moldovan fe929d8efe keymgr: Implement KeystoreError for Bug.
This also implements `AsRef<StdError>` for `Bug` to satisfy the
`KeystoreError: AsRef<dyn StdError>` trait bound.

Part of #901
2023-06-26 13:13:16 +01:00
Gabriela Moldovan 7c023f2ec2 keymgr: Create a KeyStoreError trait for keystore errors.
The new `BoxedError` type will replace `tor_keymgr::Error`.

Part of #901
2023-06-26 13:13:15 +01:00
Nick Mathewson 08d1155cb9 Merge branch 'stabilize-ll-crates' into 'main'
Remove final "experimental" status from tor-hscrypto and tor-error.

See merge request tpo/core/arti!1291
2023-06-23 21:09:11 +00:00
Nick Mathewson 9e3e683e1b arti, hsclent: remove dependencies on tor-error/experimental-api
The relevant ErrorKinds and macros are now stable.
2023-06-23 12:49:46 -04:00
Nick Mathewson 7510f52eea hscrypto: remove "tor-error/experimental-api" dependency
The ErrorKinds that we use here are now non-experimental.
2023-06-23 12:49:46 -04:00
Nick Mathewson 085c45ed18 tor-error: Mark define_asref_dyn_std_error as non-experimental
(I see no problems with this macro.  In the worst case, we deprecate
it someday.)
2023-06-23 12:49:46 -04:00
Nick Mathewson e3b13f6cd8 netdoc: fill in some test data
This resolves some TODO HS items now that we are confident we want
to have these actual examples in our tests.
2023-06-23 11:23:18 -04:00
Ian Jackson 6572de2677 Merge branch 'random-idx-where' into 'main'
random_idx_where: Fix bias

See merge request tpo/core/arti!1301
2023-06-23 14:57:39 +00:00
Nick Mathewson 0fb70f646e Merge branch 'circuit-bis' into 'main'
Add TODO SPEC for issues dealt with in !1299

See merge request tpo/core/arti!1303
2023-06-23 14:11:33 +00:00
Nick Mathewson 56198928ee Merge branch 'expire' into 'main'
tor-hsclient: Add a TODO SPEC re circuit dirtiness

See merge request tpo/core/arti!1302
2023-06-23 13:31:24 +00:00
Jim Newsome 7a8bade262 random_idx_where: Ensure uniform distribution of choice
Previously, this was more likely to select elements that occurred after
other elements that didn't satisfy the predicate.
2023-06-23 08:25:01 -05:00
Jim Newsome 35e6cc285b Add more tests for random_idx_where 2023-06-23 08:24:35 -05:00
Ian Jackson 03960b5048 Merge branch 'idx' into 'main'
tor-circmgr: Fix random_idx_where with empty slice

Closes #918

See merge request tpo/core/arti!1296
2023-06-23 13:12:22 +00:00
Alexander Færøy 7f965e465a Merge branch 'circuit' into 'main'
Drop intro circuit after ack, and deal with TODOs

See merge request tpo/core/arti!1299
2023-06-23 13:09:50 +00:00
Ian Jackson 73cce4b93c tor-hsclient: Add TODO SPEC for issues dealt with in !1299 2023-06-23 14:00:45 +01:00
Ian Jackson f0c9e482da tor-hsclient: Add a TODO SPEC re HS intro extend-and-reuse 2023-06-23 13:53:51 +01:00
Ian Jackson 21fb232a6c tor-hsclient: Add a TODO SPEC re data lifetime 2023-06-23 13:49:38 +01:00
Ian Jackson ee76d3b9ee tor-hsclient: state tests: Test housekeeping (data expiry) 2023-06-23 13:49:38 +01:00
Ian Jackson a54f33f77b tor-hsclient: state tests: Promote mk_hsconn call 2023-06-23 13:49:38 +01:00
Ian Jackson 3cd7cf25b2 tor-hsclient: state tests: Introduce connect_called
This will allow us to track when `Data` is discarded.
2023-06-23 13:49:38 +01:00
Ian Jackson f4057285ce tor-hsclient: Expire old data eventually
Otherwise we'll fill up our RAM with junk.
2023-06-23 13:49:38 +01:00
Ian Jackson 163ee44902 tor-hsclient: Add a TODO SPEC re circuit dirtiness 2023-06-23 13:46:40 +01:00
Nick Mathewson 48d839e1b5 Merge branch 'data2' into 'main'
tor-hsclient: Expire old IPT data

See merge request tpo/core/arti!1295
2023-06-23 12:06:09 +00:00
Ian Jackson a6ca13d056 tor-hsclient: Discuss HS descriptor expiry and revision counters
And delete the corresponding TODO.
2023-06-23 12:52:59 +01:00
Nick Mathewson 5ae0c581bc Merge commit '3105f99a'.
(This is !1294, minus a redundant merge.)
2023-06-23 07:51:00 -04:00
Ian Jackson 9938491057 tor-hsclient: Downgrade multi-ipt TODO 2023-06-23 12:43:00 +01:00
Ian Jackson 6448e56942 tor-hsclient: Downgrade rend/ipt parallelism TODOs and add links 2023-06-23 12:43:00 +01:00
Ian Jackson 546d1159a6 tor-hsclient: Downgrade ipt parallelism to a note 2023-06-23 12:43:00 +01:00
Ian Jackson cf4659a981 tor-hsclient: Downgrade hsdir fetch parallelism to a note 2023-06-23 12:43:00 +01:00
Ian Jackson ef85b9290e tor-hsclient: Drop intro circuit after ack 2023-06-23 12:43:00 +01:00
Ian Jackson 6bbe1dd4ef tor-hsclient: Discuss intro circuit extend-and-reuse
This is a summary of a discussion I had on IRC.
2023-06-23 12:41:29 +01:00