Commit Graph

4767 Commits

Author SHA1 Message Date
Nick Mathewson e06cd63ffd Merge branch 'dirclient-semver-entry' into 'main'
Missing semver entry for new dirclient API from !1323

See merge request tpo/core/arti!1327
2023-06-28 12:58:19 +00:00
Ian Jackson cf5235a713 HS timeout parameters: Restore some TODOs
Conceptually this is a fixup to
  HS configuration: Add retry parameters to configuration
which erroneously removed these comments - they were intended to apply
to *all* these parameters, not just the max attempts.

Not marking it as fixup! because that would involve merge conflicts.
2023-06-28 13:32:54 +01:00
Ian Jackson 11bb7e8a90 HS configuration: Use configured maximum attempts - comment
Explain why this fallback to MAX is good.

Discussion
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1305#note_2915927
2023-06-28 13:32:54 +01:00
Ian Jackson 2bfe12983a HS configuration: Use configured maximum attempts (fmt) 2023-06-28 13:32:54 +01:00
Ian Jackson be33f00b31 HS configuration: Use configured maximum attempts 2023-06-28 13:32:54 +01:00
Ian Jackson a0b6f34e42 HS configuration: Plumb configuration through (fmt)
Apply deferred rustfmt churn.
2023-06-28 13:32:54 +01:00
Ian Jackson 3ebc3216e3 HS configuration: Plumb configuration through (clippy)
Apply deferred clippy churn.
2023-06-28 13:32:54 +01:00
Ian Jackson 984652217a HS configuration: Plumb configuration through
Invent a trait a la circmgr config for the hs client connector config.
Plumb a suitable value all the way through to the code that will use it.
2023-06-28 13:32:54 +01:00
Ian Jackson cdad2db082 HS configuration: Add retry parameters to configuration
I think these should go in `[circuit_timing]`.  That section already
has some retry parameters, so is not strictly *timing*.

This is not honoured yet.
2023-06-28 13:32:54 +01:00
Ian Jackson cc25c82d4b HS configuration: Add and honour `allow_onion_addrs` in configuration
We put this in `[address_filter]`.

The interaction with the corresponding stream preference is a bit
complicated.  We must turn the stream pref into a `BoolOrAuto`.
2023-06-28 13:32:54 +01:00
Nick Mathewson 2bee27a737 Merge branch 'hsdir-identity' into 'main'
tor-hsclient: Completely hide hsdir identities in errors

See merge request tpo/core/arti!1326
2023-06-28 12:30:22 +00:00
Gabriela Moldovan 70f468d0f1 keymgr: Downgrade some TODOs to "TODO HSS".
These don't need to be blockers for the next release.
2023-06-28 13:11:53 +01:00
Gabriela Moldovan 928a9cd7ca keymgr: Remove outdated TODOs regarding error handling.
These were tackled in #901.
2023-06-28 13:07:52 +01:00
Nick Mathewson 42e4929226 Missing semver entry for new dirclient API from !1323 2023-06-28 08:06:32 -04:00
Ian Jackson 41737efced tor-hsclient: Completely hide hsdir identities in errors 2023-06-28 13:02:44 +01:00
gabi-250 63a7b25711 art cfg tests: Fix garbled doc wording 2023-06-28 12:56:09 +01:00
gabi-250 d56f28bc6f arti cfg tests: Fix doc comment 2023-06-28 12:56:09 +01:00
Ian Jackson ac38c862ec arti cfg tests: Overhaul exception handling (fmt) 2023-06-28 12:56:09 +01:00
Ian Jackson c0c0beb8e1 arti cfg tests: Overhaul exception handling
This was super confusing and fragile.  Amongst the problems:

 * Information about exceptional config keys was spread across a
   number of places, manipulated in ad-hoc ways (conditional Vec
   appends, etc).

 * As a consequence, each exceptional table has confusing and unclear
   semantics.

 * It doesn't deal well with the way that cargo sometimes enables
   features for dependency crates even if arti itself wouldn't demand
   them; this can lead to sub-crates supporting config keys when the
   tests in arti don't expect them to, causing spurious test failures.

Fix this:

 * Introduce a new, systematic, way of writing information about
   configuration keys that need some kind of special handling.

 * Use this new approach in *both* sets of "thorough" config tests.

 * Be more relaxed about deprecated keys.  We don't want to tightly
   couple this to absence in the supported file, I think.

 * Understand more clearly the concept of keys of which we don't know,
   in the current build config, whether the code is expected to
   accept them.

I have tested this locally with:

   for p in '-p arti' '--workspace'; do for f in '--no-default-features --features=tokio,native-tls' '--all-features' ''; do nailing-cargo test $p $f; done; done
2023-06-28 12:56:09 +01:00
Ian Jackson 479ed9d168 arti cfg tests: Remove a comment relating to work already done
We *do* have a thing that works like this.

It's fragile and confusing and that's what I'm about to fix.
2023-06-28 12:56:09 +01:00
Ian Jackson 0cde6134d0 arti cfg tests: Code motion
Bring the exciting tests together, and move some more normal tests out
of the middle.
2023-06-28 12:56:09 +01:00
Ian Jackson 2656b8fa04 geoip: conditionalise a test
Without this, the build fails with
  cargo test --workspace --no-default-features --features=tokio,native-tls
2023-06-28 12:56:09 +01:00
Ian Jackson ebb3455b3e Conditionalise an import
Fixes a warning with
  cargo clippy --locked --offline --workspace --all-targets
2023-06-28 12:56:09 +01:00
Ian Jackson a6aa113865 Mark a builder as non-exhaustive
If all the fields vanish, this generates a warning with
  cargo clippy --locked --offline --workspace --all-targets

Fix that.
2023-06-28 12:56:09 +01:00
gabi-250 6b8218f960 Merge branch 'keymgr-error-kind' into 'main'
keymgr: Implement ErrorKind for keymgr error types

See merge request tpo/core/arti!1315
2023-06-28 11:34:23 +00:00
Alexander Færøy 26c4a274c7 Merge branch 'dirclient-todos' into 'main'
Resolve remaining dirclient HS todos

See merge request tpo/core/arti!1323
2023-06-28 11:33:32 +00:00
Gabriela Moldovan dff8c0163b keymgr: Implement HasKind for ArtiNativeKeystoreError. 2023-06-28 11:59:00 +01:00
Gabriela Moldovan 6ed8f5b9ea tor-error: Add KeystoreAccessFailed, KeystoreFsPermissions to ErrorKind. 2023-06-28 11:59:00 +01:00
Gabriela Moldovan ef1c969c73 keymgr: Implement HasKind for SshKeyError. 2023-06-28 11:59:00 +01:00
Gabriela Moldovan c8a128cc59 tor-error: Add KeystoreCorrupted to ErrorKind. 2023-06-28 11:59:00 +01:00
Nick Mathewson f778d32a0e Merge branch 'ticket_914' into 'main'
Remove support for receiving unauthenticated SENDMEs.

Closes #914

See merge request tpo/core/arti!1283
2023-06-28 10:54:05 +00:00
Nick Mathewson 6f3761c24f dirclient: use correct default max_len
Yes, it's 50 kilobytes, not 50 kibibytes. I double-checked this with
the C implementation and with param-spec.txt's documentation for
`HSV3MaxDescriptorSize`.
2023-06-27 16:21:29 -04:00
Nick Mathewson 4692dba5e0 hsclient: Use HsDescDownloadRequest::set_max_len. 2023-06-27 16:21:29 -04:00
Nick Mathewson 32e3cde3fd dirclient: Correct an erroneous comment. 2023-06-27 16:21:29 -04:00
Nick Mathewson 38db06ee4b dirclient: Make maximum hsdesc length adjustable. 2023-06-27 16:21:29 -04:00
Nick Mathewson 01ea20759b dirclient: Explain why hardcoding "3" is ok. 2023-06-27 16:04:49 -04:00
Gabriela Moldovan e332caf562 keymgr: Remove unneeded error variant.
The `Unsupported` variant is no longer needed now that we support
`KeyType::X25519StaticSecret`s.
2023-06-27 20:11:07 +01:00
Gabriela Moldovan 7732ac131b keymgr: Add support for x25519 keys. 2023-06-27 20:11:07 +01:00
Gabriela Moldovan 257797fff6 keymgr: Return a concrete type from read_ed25519_keypair.
This also fixes a bug which caused the function to always return a
type-erased `()` instead of the actual key!
2023-06-27 20:11:07 +01:00
Gabriela Moldovan b91a1c2859 keymgr: Move TODO closer to the code it refers to. 2023-06-27 20:11:07 +01:00
Gabriela Moldovan c114c413c2 keymgr: Map KeyType::X25519StaticSecret to an SshKeyAlgorithm. 2023-06-27 20:11:07 +01:00
Gabriela Moldovan 8edbd04413 keymgr: Define an SshKeyAlgorithm enum.
This previously just re-exported `ssh_key::Algorithm`.

However, we will need to support x25519 keys (which aren't supported by
the `ssh_key` crate), so we define our own enum for the key algorithm.
In addition to the `Algorithm` variants from `ssh_key`, our enum also
has an `X25519` variant.
2023-06-27 20:11:07 +01:00
gabi-250 eb54691c50 Merge branch 'keymanip-ed-to-curve' into 'main'
llcrypto: Implement ed25519_to_curve25519_private conversion.

See merge request tpo/core/arti!1297
2023-06-27 19:10:33 +00:00
Gabriela Moldovan aa5e9b1e95 llcrypto: Add reference to paper about keypair reuse. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan b466b24a18 llcrypto: Remove `# Availability` doc sections.
This removes the `# Availability` section from the
`convert_ed25519_to_curve25519_private` and
`convert_curve25519_to_ed25519_private` docs.

We don't generally have this sort of section anywhere else in the
codebase (we use unstable cargo-docs features to make sure items are
annotated correctly).
2023-06-27 19:23:42 +01:00
Gabriela Moldovan 32261d4006 llcrypto: Add cvt-x25519 feature flag for exporting key conversion functions.
The `convert_curve25519_to_ed25519_private` and
`convert_ed25519_to_curve25519_private` functions are now exported by
`tor-llcrypto` if the `cvt-25519` feature is enabled.
2023-06-27 19:23:42 +01:00
Gabriela Moldovan 9e80a206ca llcrypto: Add keymgr feature to semver.md 2023-06-27 19:23:42 +01:00
Gabriela Moldovan 94f405704f llcrypto: Add `Panics`, `Availability` docs for convert_ed25519_to_curve25519_private. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan 7c44984f3d llcrypto: Fix clippy lint. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan e06fc04b0b llcrypto: Explain what we need the ed25519->x25519 conversion for. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan fa6290c0cc llcrypto: Document how convert_ed25519_to_curve25519_private computes the key. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan 7ecb2221a0 llcrypto: Add note about bumping x25519-dalek and clamping.
This adds a TODO explaining how convert_ed25519_to_curve25519_private
will need to be audited when we upgrade to the latest x25519-dalek.

This also adds a `debug_assertions` and a test that ensures
`StaticSecret::from` is clamping the input (when we bump x25519-dalek,
the assertions will fail, as the latest version doesn't do clamping in
StaticSecret::from).
2023-06-27 19:23:42 +01:00
Gabriela Moldovan 1fe15c5012 llcrypto: Document ed25519->curve25519->ed25519 conversion behaviour. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan 47606ad881 llcrypto: Implement ed25519_to_curve25519_private conversion.
In `ArtiNativeKeyStore`, private keys are stored in OpenSSH format.
However, `ssh-key` (the crate we use for parsing OpenSSH keys) doesn't
support x25519 keys. As a workaround, this type of key will stored
as ed25519 and converted to x25519 upon retrieval.

This commit implements the `convert_ed25519_to_curve25519_private`
conversion function (needed by `ArtiNativeKeyStore` to support x25519
keys).

Part of #900
2023-06-27 19:23:42 +01:00
Gabriela Moldovan 58a4cc3000 llcrypto: Add missing docs for hsv3-service feature flag. 2023-06-27 19:23:42 +01:00
Gabriela Moldovan 6dfcf40d20 keymgr: Add regression test for tor_keymgr::Error recursion bug. 2023-06-27 19:22:30 +01:00
Gabriela Moldovan a41c3a5c7c keymgr: Fix infinite recursion in Error impl.
The `source` impl `tor_keymgr::Error` was just calling itself
recursively.
2023-06-27 19:22:30 +01:00
Nick Mathewson dd7b965199 Merge branch 'revert_to_x25519_pre1' into 'main'
Back down x25519-dalek to 2.0.0-pre.1 from 2.0.0-rc.2

Closes #926

See merge request tpo/core/arti!1317
2023-06-27 18:16:38 +00:00
pinkforest 4be2e3ce0f Back down x25519-dalek to 2.0.0-pre.1 from 2.0.0-rc.2
=========================
Notes from nickm:

(This differs from pinkforest's original MR: It removes the
Cargo.lock changes and the version bump on tor-llcrypto.)

Minimal Cargo.lock changes from downgrade.

(These are exactly those changes generated by running "build" and
"test".)

There are several reasons to do this:

  * It's best to bump all of our dalek dependencies at once to rc.3
    or later, rather than the piecemeal approach we've been stuck
    with so far.

  * We don't want to do this bump right now, since there are some
    tricky questions about clamping we need to figure out (see
    #808), and we need to make sure we get them right, and we're in
    a distracted this week.

  * We _do_ need to move away from 2.0.0-rc.2 right now, since
    it was causing a failure in `cargo install arti`, and then it
    got yanked.

Thanks to pinkforest for helping us out here and explaining all of
this!

Fixes #926.

Commit-edited-by: Nick Mathewson <nickm@torproject.org>
2023-06-27 13:55:24 -04:00
Saksham Mittal d6626acd65
Add Channel expiry info in ChanMgr docs 2023-06-27 18:24:56 +05:30
Ian Jackson 062b7e7ced tor-hsclient: Increase some timeouts
1. Fix a use of 10ms that should have been TIMEOUT_SLOP.
2. Increase BODGE_YIELD by a factor of 5.

Now this test should tolerate being hung up for 125ms.  I am hoping
that this will fix the CI failure
  https://gitlab.torproject.org/Diziet/arti/-/jobs/302457
which fails at the line comparing circuit1 with circuit2a.
(I can't repro that locally.)
2023-06-26 17:57:33 +01:00
Ian Jackson e5c4551993 tor-hsclient: test: Introduce some constants for timings 2023-06-26 17:57:33 +01:00
Ian Jackson c8d1cdded7 tor-hsclient: test: Add another sleep for expiry task *start*
Without this, the expiry task can end up choosing a 600s timeout
starting *after we advanced the clock*.

Fixes #923
2023-06-26 17:55:10 +01:00
Ian Jackson 355e65003c tor-hsclient: impl Debug by hand for MockCirc
The provided impl for Mutex is hopeless: it prints just some internal
flags and doesn't acquire the mutex for printing purposes.

At some point we might want to factor this out as a general function
on `Arc<Mutex<...>>` but not now.
2023-06-26 17:55:10 +01:00
gabi-250 639efe65f6 Merge branch 'send_sync_torclientbuilder' into 'main'
arti-client: Mark DirProviderBuilder Send+Sync;

Closes #924

See merge request tpo/core/arti!1307
2023-06-26 15:51:37 +00:00
Nick Mathewson 09e4676a99 Also require that TorClientBuilder be Sync. 2023-06-26 10:58:48 -04:00
Nick Mathewson 357f8ebf8d Merge branch 'netdoc-todos-again' into 'main'
netdoc: Resolve nearly all remaining TODO HS items.

See merge request tpo/core/arti!1304
2023-06-26 14:55:27 +00:00
gabi-250 dece1bec6c Merge branch 'upgrade-itertools' into 'main'
Upgrade to itertools 0.11.0

See merge request tpo/core/arti!1306
2023-06-26 14:42:02 +00:00
Nick Mathewson 5f0855f3df netdoc: remove final TODO HS
Although this Errorkind is not perfect, it is good enough.
2023-06-26 09:57:26 -04:00
Nick Mathewson 83fbae201d netdoc: Downgrade TODO on EncryptedHsDesc::decrypt 2023-06-26 09:57:26 -04:00
Nick Mathewson 0933937567 netdoc: Remove "decrypted_with_id" as meaningless
Actually, never mind about adding an accessor here: this value was
set incorrectly and didn't match its documentation.  As such it's
basically useless, and we might as well throw it out.
2023-06-26 09:57:26 -04:00
Nick Mathewson 6313f0513e netdoc: Remove dead_code exception; add accessors.
This commit removes some actual dead code and additionally adds some
minimal accessors to HsDesc to expose some of its properties.  (I'm
trying to keep these minimal since it's not yet clear whether we
want to expose more detail here.)

Here we also make StoredHsDescMeta a conditional type that's only
present when the new "hs-dir" feature is enabled.  Neither relays
nor clients need this: Only HsDirs will need it, when we finally
implement relays.
2023-06-26 09:57:26 -04:00
Nick Mathewson 30124acbc5 arti-client: Mark DirProviderBuilder Send+Sync;
Doing this causes TorClientBuilder to become Send.  I also add a
test to ensure that TorClientBuilder remains Send in the future.

This isn't a semver break, but only because DirProviderBuilder is
marked with `experimental-api`.

Closes #924
2023-06-26 09:49:56 -04:00
Ian Jackson b31a253931 Merge branch 'data' into 'main'
tor-hsclient: Expire old IPT and HS descriptor data eventually

See merge request tpo/core/arti!1290
2023-06-26 13:45:15 +00:00
Nick Mathewson 2f513fd82d netdoc: Note new feature in itertools 2023-06-26 09:41:34 -04:00
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
Ian Jackson 9a2702b58b Merge branch 'expire' into 'main'
tor-hsclient: Expire circuits when they get too old

See merge request tpo/core/arti!1287
2023-06-23 10:40:19 +00:00
Ian Jackson 879c540cfa tor-circmgr: Test random_idx_where with empty slice
I have verified that this test fails, as expected, when applied
without the corresponding bugfix.
2023-06-23 11:09:59 +01:00
Ian Jackson a0f5dbc05d tor-circmgr: random_idx_where: Don't panic on empty range
Fixes #918.
2023-06-23 11:09:55 +01:00
Ian Jackson e4ff44e760 tor-hsclient: Write a test plan for IPT state management
This won't be trivial.  Put it in as a TODO HS rather than as part of
this fix MR.
2023-06-23 10:34:28 +01:00
Ian Jackson 14b697bcff tor-hsclient: Expire old IPT data
If we don't use it for a whole, the whole of `Data` will be expired by
the new machinery in !1290.  However, we also need to expire
individual IPTs.

This bug doesn't seem to have had a relevant TODO.
2023-06-23 10:34:28 +01:00
Andy 3105f99a99 Corrected the order of imports in order to make the 'rust-checks' job complete successfully. 2023-06-23 01:25:28 +02:00
Andy bec24f7920 Provided a fix for #831 - 'Unused import' warnings on Windows 2023-06-23 01:11:20 +02:00
Nick Mathewson 8ecb4107d4 hscrypto: downgrade a comment to HSS 2023-06-22 15:37:34 -04:00
Nick Mathewson 20940644ca Merge branch 'desc-error' into 'main'
Clean up HsDesc error types and stabilize onion-service ErrorKinds

See merge request tpo/core/arti!1289
2023-06-22 18:56:14 +00:00
Nick Mathewson 24545fd455 Merge branch 'circmgr-timeout-est' into 'main'
circmgr: New API to expose estimate-based timeouts.

See merge request tpo/core/arti!1281
2023-06-22 18:50:40 +00:00
gabi-250 f2c3b5760d Merge branch 'move-dummy-keymgr-impl' into 'main'
keymgr: Move dummy keymgr impl from arti-client to tor-keymgr

See merge request tpo/core/arti!1269
2023-06-22 18:06:00 +00:00
Nick Mathewson 1249d803fb Merge branch 'proto-better-path' into 'main'
Better API for getting circuit paths

Closes #787

See merge request tpo/core/arti!1286
2023-06-22 17:53:23 +00:00
Nick Mathewson dcb3b06a95 circmgr: Now that Action is public, clean it up a little. 2023-06-22 13:53:14 -04:00
Nick Mathewson 2b0d04a5fe circmgr: New API to expose estimate-based timeouts.
This will help create good timeout values for various onion-service
operations.
2023-06-22 13:53:14 -04:00
Nick Mathewson 18982e6b93 hsdescerror: Add paragraph breaks to docs. 2023-06-22 13:44:56 -04:00
Nick Mathewson 90f653f582 netdoc: Use a dev-dependency on anyhow to fix a doc example 2023-06-22 13:42:40 -04:00
Nick Mathewson c78d7f63a4 Merge branch 'proto-todos' into 'main'
tor-proto: resolve or defer the easier TODO HS items.

See merge request tpo/core/arti!1282
2023-06-22 17:42:06 +00:00
Ian Jackson 26a8cfea6c tor-hsclient: Add a note about circuit expiry uncertainty, ticket 2023-06-22 18:41:27 +01:00
Gabriela Moldovan e46d4fe66f keymgr: Remove blank line to satisfy maint/cargo_sort. 2023-06-22 18:34:20 +01:00
Gabriela Moldovan bc24e7974c keymgr: Make the dummy types non_exhaustive. 2023-06-22 18:34:20 +01:00
Gabriela Moldovan 8bfdb69ebc keymgr: Add a TODO regarding missing dummy impls. 2023-06-22 18:34:20 +01:00
Gabriela Moldovan 297248cd9f keymgr: Update outdated docs. 2023-06-22 18:34:19 +01:00
Gabriela Moldovan cd0cad3aa6 keymgr: Remove outdated TODOs. 2023-06-22 18:34:04 +01:00
Gabriela Moldovan f2d81c73ac keymgr: Remove unnecessary dummy types.
We don't need dummy impls for `Error` and `Result`.
2023-06-22 18:34:04 +01:00
Gabriela Moldovan fbb1ad0b1e keymgr: Move dummy implementation to tor-keymgr. 2023-06-22 18:33:43 +01:00