Commit Graph

7063 Commits

Author SHA1 Message Date
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 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
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
Gabriela Moldovan b83b77d83e arti-client: Make all dummy APIs pub.
`dummy.rs` will be moved to `tor-keymgr`, which will export everything
from the module.
2023-06-22 18:31:28 +01:00
Gabriela Moldovan f293bd64f2 arti-client: Add a dummy KeyType. 2023-06-22 18:30:54 +01:00
Nick Mathewson 5ce7221f06 hspool: Use let-else pattern; our MSRV permits it. 2023-06-22 13:21:36 -04:00
Nick Mathewson 3ccec0b04a tor-error: Stabilize OnionService error kinds 2023-06-22 13:17:08 -04:00
Nick Mathewson 3d4181bcd4 tor-error: typo fix in a comment. 2023-06-22 13:15:50 -04:00
Nick Mathewson 33bfa7c7a8 Remove onion service descriptor-related errorkinds.
These have been subsumed by other errorkinds, mostly
OnionServiceProtocolViolation and TorProtocolViolation.

In particular please review the change in tor-hsclient closely;
I am not sure about the new errorkinds for the error there.
2023-06-22 13:11:06 -04:00
Gabriela Moldovan fbdf05946c keymgr: Remove unnecessary pub(crate). 2023-06-22 18:07:57 +01:00
Gabriela Moldovan 273cd70021 keymgr: Define a `keymgr` feature.
The dummy key manager impl from `arti-client` will be moved to
`tor-keymgr` soon. This commit adds a `keymgr` feature flag to
`tor-keymgr` which will eventually be used to choose between the real
key manager API and the dummy one.
2023-06-22 18:07:57 +01:00
Nick Mathewson dbd2552178 netdoc: Introduce HsDescError
For higher-level HsDesc-related functions, this type indicates where
exactly an error occurred.  It lets us distinguish decryption errors
from parsing errors, and attribute responsibility to the hsdir, the
onion service, or the user's lack of encryption.

This lets us remove some just-introduced complexity in
tor-hsclient.
2023-06-22 12:43:30 -04:00
Nick Mathewson 610ed2d457 Merge branch 'socks_errorkinds' into 'main'
Generate correct-ish socks5 errors for onion service errors.

Closes #736

See merge request tpo/core/arti!1279
2023-06-22 16:15:55 +00:00
gabi-250 4b7060a492 Merge branch 'notes' into 'main'
tor-hsclient: Delete/rewrite out-of-date commentary

See merge request tpo/core/arti!1288
2023-06-22 16:00:34 +00:00
Alexander Færøy 25e5a77475 Merge branch 'downgrade-todo' into 'main'
keymgr: Remove/downgrade TODOs

See merge request tpo/core/arti!1285
2023-06-22 15:35:02 +00:00
Nick Mathewson 57b1e36667 arti: Resolve TODO HS items related to extended SOCKS5 errors
This takes an approach discussed in #736: Instead of trying to
distinguish INTRO/REND failures perfectly, we instead map our
existing ErrorKinds as best we can, in respect to the fact that
this distinction is not super important in practice.

Closes #736
2023-06-22 11:05:57 -04:00
Nick Mathewson 967cae6ced New ErrorKind for invalid onion addresses
Use this to emit HS_BAD_ADDRESS as appropriate.
2023-06-22 10:57:08 -04:00
Nick Mathewson 42f16fc2ce socksproto: Add unspecified but documented socks5 extension codes 2023-06-22 10:56:24 -04:00
Nick Mathewson 1a9e5b8463 Remove ErrorKind::OnionService{Intro,Rend}Failed
These errors are orthogonal to our actual error kinds.  See
discussion on #736.
2023-06-22 10:56:23 -04:00
Ian Jackson 6cd56972e4 tor-hsclient: Delete/rewrite out-of-date commentary 2023-06-22 15:48:41 +01:00
Nick Mathewson 8a6836cf4a proto: Resolve/downgrade some path-related "TODO HS" items 2023-06-22 09:45:47 -04:00
Nick Mathewson f80a1189a5 proto: Implement Redactable and Display for PathEntry. 2023-06-22 09:45:47 -04:00
Nick Mathewson 1bb298d1e6 circmgr: Use path_ref() instead of path(). 2023-06-22 09:45:47 -04:00
Nick Mathewson f2fc086594 proto: Add ClientCirc::path_ref(), deprecate path().
The new path_ref() method returns an Arc<Path>, which gives a much
better API for reasons discussed in the new documentation of path().

(We could just replace path() if we'd prefer, but IMO having
path_ref() here isn't so bad.)
2023-06-22 09:45:47 -04:00
Nick Mathewson b64cf3f6f0 proto: Make Path and PathEntry at least minimally useful
(I'm not 100% sure about having both hops() and iter(). Should I
remove one?)
2023-06-22 09:45:47 -04:00
Nick Mathewson 1e1a76f7ac proto: Expose an opaque PathEntry.
The new PathEntry struct wraps the old PathEntry enum, which has
been renamed to HopDetail.  It's an opaque struct because we want to
be able to put new information in the enum as we think best.
2023-06-22 09:45:47 -04:00
Nick Mathewson e6735cdd9d proto: Make Path public
(You can't get one yet or do much with it.)
2023-06-22 08:37:34 -04:00
Nick Mathewson 8609b9f92a proto: Remove Mutex from Path.
Now Path is a regular struct with no interior mutability, and we use
Arc::make_mut() for the case when we need to add a hop.
2023-06-22 08:37:18 -04:00
Nick Mathewson 2d3739bfe1 proto: Move Path into a separate shared mutable structure
(We're about to remove the interior mutability from Path.)
2023-06-22 08:23:51 -04:00
Gabriela Moldovan e5aafa129b keymgr: Downgrade 2 "TODO hs" to "TODO HSS". 2023-06-22 11:28:24 +01:00
Gabriela Moldovan 84b2cc98d5 keymgr: Remove outdated TODO.
This TODO talks about a change we've decided not to implement.
2023-06-22 11:25:27 +01:00
Nick Mathewson ea99e728d2 proto: Downgrade a comment about unauthenticated SENDMEs
We never actually need to allow these again; see #914
2023-06-21 15:42:19 -04:00
Nick Mathewson fa9a3821a6 proto::circuit:🤝 downgrade a "TODO HS". 2023-06-21 15:09:02 -04:00