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
Ian Jackson
fb3112fb73
tor-hsclient: Expand explanation of `last_used` (for Open)
2023-06-22 17:21:06 +01:00
Nick Mathewson
7842ace4db
tor-hsclient: Make comment about circuit expiry more accurate
2023-06-22 16:16:23 +00: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
Ian Jackson
7001a38c0c
tor-hsclient: linkify a URL in a doc comment
2023-06-22 15:45:13 +01:00
Ian Jackson
fe76477342
tor-hsclient: Apply broken formatting as demanded by rustfmt
2023-06-22 14:54:48 +01:00
Ian Jackson
10b54065e8
tor-hsclient: Test circuit expiry
2023-06-22 14:54:48 +01:00
Ian Jackson
3badca02c9
tor-hsclient: Expire HS circuits that we don't want to reuse
2023-06-22 14:54:00 +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
Ian Jackson
a35a1402ae
tor-hsclient: Introduce helper function for locking services table
2023-06-22 13:32:14 +01:00
Ian Jackson
dedda8a590
tor-hsclient: Abolish an obsolete comment
...
We don't now handle inability to store by panicking. Like the
previous comment says, such situations end up with Err in stored,
and that's handled by logging, below.
2023-06-22 13:24:16 +01: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
Nick Mathewson
5912509b05
proto: Put client and service hs_ntor behind individual features
...
This lets us keep the service-side hs-ntor handshake experiemental
for now.
2023-06-21 15:06:20 -04:00
Nick Mathewson
cc8c3c0d7d
proto: Resolve some hs_ntor "TODO HS" comments.
2023-06-21 14:58:54 -04:00
Nick Mathewson
a317476520
proto: downgrade some "TODO HS" comments to "HSS"
...
These are all related to issues that will come up for the service
side of the onion service implementation.
2023-06-21 14:52:50 -04:00
Alexander Færøy
d1658a120e
Merge branch 'stderr' into 'main'
...
lints: Promote clippy::print_stderr and clippy::print_stdout
See merge request tpo/core/arti!1271
2023-06-21 16:41:10 +00:00
Ian Jackson
7a364cfc4d
Merge branch 'keymgr-refactor-fs-ops-2' into 'main'
...
keymgr: Make ArtiNativeKeyStore::key_path() return a relative path.
Closes #908
See merge request tpo/core/arti!1267
2023-06-21 16:40:53 +00:00
Gabriela Moldovan
b8279c3421
keymgr: Fix clippy lints.
2023-06-21 17:04:03 +01:00
Gabriela Moldovan
d8743771e8
keymgr: Remove outdated TODO.
...
This TODO was addressed in #899
2023-06-21 17:03:41 +01:00
Gabriela Moldovan
1e1cb05d27
keymgr: Make ArtiNativeKeyStore::key_path() return a relative path.
...
This also updates `ArtiNativeKeyStore`'s `KeyStore::remove`
implementation to build the absolute path of the file being removed, by
joining `self.keystore_dir` and the relpath returned by
`ArtiNativeKeyStore::key_path()`.
This addresses #908
2023-06-21 17:03:40 +01:00
Gabriela Moldovan
91abe17da1
keymgr: Derive Into for ArtiPath.
...
Sometimes we need the underlying String (for example to create a
PathBuf).
2023-06-21 17:01:02 +01:00
Ian Jackson
f7a93d6de9
Merge branch 'keymgr-api-consistency' into 'main'
...
keymgr: Remove Error::NotFound, update KeyMgr, KeyStore APIs.
See merge request tpo/core/arti!1280
2023-06-21 15:54:02 +00:00
Ian Jackson
8f7e86c87e
lints: Run maint/add_warning to actually apply new lints (again)
...
I prepared 161b9844d
against an earlier version of main without the
geoip crate. Run maint/add_warning again.
2023-06-21 16:44:49 +01:00
Ian Jackson
ffa94d8f30
Merge branch 'keymgr-rm-cond' into 'main'
...
keymgr: Remove unnecessary condition.
See merge request tpo/core/arti!1277
2023-06-21 15:28:07 +00:00
Ian Jackson
5ca0cbdefc
Merge branch 'keymgr-remove-todo' into 'main'
...
keymgr: Remove outdated TODO.
See merge request tpo/core/arti!1278
2023-06-21 15:27:26 +00:00