Commit Graph

694 Commits

Author SHA1 Message Date
Ian Jackson 42df88d6bf Run maint/add_warning to add lint block everywhere 2023-08-23 10:34:00 +01:00
Nick Mathewson c2faedbca7 arti-client: Fix a couple more typos.
I spotted these while I was working on something else.
2023-08-22 16:23:51 -04:00
Nick Mathewson 7a37641aeb Use "typos-cli" to fix a bunch of typos. 2023-08-22 16:23:51 -04:00
Nick Mathewson c0e050b640 Resolve a pair of warnings about redundant closures. 2023-08-22 12:24:51 -04:00
Nick Mathewson 80c921c637 Resolve warnings about ambiguous/redundant doc links
Nightly rustdoc now warns if you have a link that isn't necessary,
and if you have a link that might refer to two different things.
2023-08-22 09:00:33 -04:00
Nick Mathewson b0a30da76c arti-client: fix conditional unused_import and dead_code warnings 2023-08-16 13:44:18 -04:00
Gabriela Moldovan 5c5a7bfb14
arti-client: Use Path::join instead of format!. 2023-08-14 16:21:55 +01:00
Gabriela Moldovan d9a04ff9ad
arti-client: Make from_directories() derive the keystore_dir from state_dir.
Closes #988
2023-08-11 12:09:52 +01:00
Ian Jackson 4b64f988aa bridge config: Fix an error message slightly 2023-08-08 18:01:31 +01:00
Ian Jackson 635edd4129 arti-client config test: partially un-degrade formatting 2023-08-08 18:01:31 +01:00
Ian Jackson 2fc249ce66 arti-client config test: degrade formatting
As demanded by rustfmt
2023-08-08 18:01:31 +01:00
Ian Jackson e142f9a560 arti-client config: Add an extra test case for bridges
This complements the new `check_bridge_pt` test.
2023-08-08 18:01:31 +01:00
Ian Jackson 9ba4b496fd bridge config: reject bridges=true when there are no bridges
This is a bugfix.  Perhaps it is a security fix?
2023-08-08 18:01:31 +01:00
Nick Mathewson cec6d0ce33 Run add_warnings on all files. 2023-08-04 07:45:04 -04:00
Nick Mathewson 5a84da3e1b Fix and expand the description of OnionAddressDisabled
Previously there was a missing "not", and it didn't say what to do
about the error.
2023-08-03 09:43:03 -04:00
Saksham Mittal 752f748910 Add error if [[bridges.transports]] isn't written in config file 2023-08-01 16:43:46 +00:00
Nick Mathewson 3acdf102c7 Increment patchlevel versions of crates with minor changes
These crates are at version 0.x.y, so we don't need to distinguish
new-feature changes from other changes:

```
tor-basic-utils
fs-mistrust
tor-error
tor-geoip
tor-checkable
tor-linkspec
tor-netdoc
tor-netdir
tor-persist
tor-ptmgr
tor-hsservice
```

This crate has a breaking change, but only when the semver-breaking
feature `experimental-api` is enabled:

```
tor-config
```

This crate is at version 1.x.y, but has no new public APIs, and
therefore does not need a minor version bump:

```
arti
```
2023-08-01 10:57:55 -04:00
Nick Mathewson 6f2ae59603 Update minor versions on crates that have had breaking changes
These crates had first-order breaking changes:

```
retry-error
tor-keymgr
tor-proto
tor-hsclient
tor-rtmock
```

Additionally, these broke because they re-exposed RetryError:

```
tor-circmgr
```

Additionally, these broke because they may re-expose something from
tor-proto:

```
    arti-client
    tor-chanmgr
    tor-dirclient
    tor-dirmgr
    tor-guardmgr
```

Additionally, these broke for other fiddly reasons:

`tor-ptmgr` implements traits from tor-chanmgr, which has a breaking
change above.

`arti-hyper` exposes types from arti-client in its API.
2023-08-01 10:51:25 -04:00
sw1tch b6873a9b84 pass reconfigure_lock guard into TorClient::reconfigure_inner 2023-07-25 19:31:36 +02:00
sw1tch 7347d45acc cargo fmt 2023-07-24 14:48:19 +02:00
sw1tch 3eee408985 fixes deadlock in TorClient::reconfigure 2023-07-24 13:39:49 +02:00
Gabriela Moldovan 98337afec9
Revert "keymgr: Require callers to be explicit about which keystore to get keys from."
This reverts commit 38a6c74c78.

This also updates some tests to make them compile with the reverted
version of the code.
2023-07-21 12:21:36 +01:00
Gabriela Moldovan 38a6c74c78
keymgr: Require callers to be explicit about which keystore to get keys from. 2023-07-20 19:24:57 +01:00
Gabriela Moldovan 9f5974fb7f
keymgr: Explicitly specify the default keystore for `KeyMgr`. 2023-07-20 19:23:58 +01:00
Gabriela Moldovan ac93b1aef6
keymgr-config: Make fields private, add function for checking if keystore is enabled.
Hiding the underlying value of `enabled` enables us to give it a
different `auto` value depending on whether the `keymgr` feature is
enabled or not (it defaults to `true` if `keymgr` is enabled, and
`false` otherwise).
2023-07-20 19:23:48 +01:00
Gabriela Moldovan f18e773332
arti-client: Use a default keystore config if `experimental-api` is disabled.
The `experimental-api` was only meant to apply to the use of the
unstable `ArtiNativeKeystoreConfig` in the Arti config.
`experimental-api` was _not_ supposed to be used for enabling/disabling
the keystore (that's what the `enabled` flag is for).
2023-07-20 19:23:45 +01:00
Gabriela Moldovan b4bf421c11
arti-client: Move variable closer to where it's used (fmt). 2023-07-20 19:23:41 +01:00
Gabriela Moldovan ea02824547
arti-client: Move variable closer to where it's used. 2023-07-20 19:23:33 +01:00
Gabriela Moldovan d7c1b2cf03
arti-client: Make the `KeyMgr` optional.
If the Arti keystore is disabled, we have nothing to initialize the
`KeyMgr` with, so we might as well make it optional.
2023-07-20 19:23:30 +01:00
Gabriela Moldovan caf2ce3f6b
arti-client: Add TODO about expanding the keystore_dir in build(). 2023-07-17 11:12:37 +01:00
Gabriela Moldovan 99b73cb22a
arti-client: Log whether a keystore is in use. 2023-07-13 12:30:10 +01:00
Gabriela Moldovan 0260405603
arti-client: Use the config struct from tor-keymgr. 2023-07-13 12:29:57 +01:00
Gabriela Moldovan c942f02dea
arti-client: Log whether the client auth keys were retrieved. 2023-07-12 16:30:06 +01:00
Gabriela Moldovan 674fc9d7dc
arti-client: Remove outdated TODO.
These errors aren't ignored anymore.
2023-07-11 16:49:44 +01:00
Ian Jackson 473447a82e Run maint/add_warning to actually apply new lint allows 2023-07-10 13:49:51 +01:00
Nick Mathewson 22f55b7cf8 Remove some needless into_iter() calls.
Clippy nightly now detects when you're calling into_iter() and
passing the result into something that accepts an
`impl IntoIterator`.
2023-07-10 12:33:21 +01:00
Kunal Mehta 7acd7de369 Update documentation regarding the `onion-service-client` feature
It is no longer experimental, but still not rated for security-sensitive
usage per <https://blog.torproject.org/arti_116_released/>.
2023-07-07 22:01:51 -04:00
Nick Mathewson 25c6fe61e4 Throughout: Use *_report!() macros for reporting Errors.
I identified the cases to replace by searching for the string
`.report()`.  There are a few that I didn't change:

  * A couple of cases that used anyhow::Error,
  * One case that reported two Errors.
  * Two cases in `tor_hsclient::err` that just did
    `error!("Bug: {}")`.

I have also not audited the cases in `tor-hsclient` where we're using
`tor_error::Report` manually.

Nonetheless, closes #949.
2023-07-07 13:00:21 -04:00
Nick Mathewson 03f9f9987a Run add_warning to remove `missing_panics_doc` deny.
Closes #950.
2023-07-06 14:32:23 -04:00
Nick Mathewson 19b1d3bba5 Additional documentation around bridges/PT configuration
This tries to flesh out some of the details for users who may be new
to bridges and PTs.

Closes #706.
2023-07-03 13:00:25 -04:00
Nick Mathewson f626bcd7f1 Finish a sentence in the documentation for TorClient::netdir() 2023-07-03 12:35:31 -04:00
Nick Mathewson 27bd990a79 Remove semver.md files for 1.1.6 2023-06-30 10:28:53 -04:00
Nick Mathewson de13a7319b Bump patchlevel versions on crates with smaller changes
Done with the commands below.

The following crates have had various changes, and should get a
patchlevel bump. Since they are pre-1.0, we do not need to
distinguish new APIs from other changes.

```
cargo set-version --bump patch -p arti-client
cargo set-version --bump patch -p safelog
cargo set-version --bump patch -p tor-bytes
cargo set-version --bump patch -p tor-cert
cargo set-version --bump patch -p tor-circmgr
cargo set-version --bump patch -p tor-config
cargo set-version --bump patch -p tor-consdiff
cargo set-version --bump patch -p tor-dirclient
cargo set-version --bump patch -p tor-dirmgr
cargo set-version --bump patch -p tor-error
cargo set-version --bump patch -p tor-hsservice
cargo set-version --bump patch -p tor-linkspec
cargo set-version --bump patch -p tor-llcrypto
cargo set-version --bump patch -p tor-netdir
cargo set-version --bump patch -p tor-netdoc
cargo set-version --bump patch -p tor-proto
cargo set-version --bump patch -p tor-rpcbase
cargo set-version --bump patch -p tor-socksproto
```

This crate has new features, but no new non-experimental Rust APIs.
So even though it is post-1.0, it gets a patchlevel bump.

```
cargo set-version --bump patch -p arti
```
2023-06-30 08:42:21 -04:00
Nick Mathewson 65e81bf0ca Bump minor versions on crates with breaking changes
Done with:
```
cargo set-version --bump minor -p tor-hsclient
cargo set-version --bump minor -p arti-rpcserver
cargo set-version --bump minor -p tor-hscrypto
cargo set-version --bump minor -p tor-cell
```
2023-06-30 08:38:16 -04:00
Gabriela Moldovan a61071f7b6 keystore: Change the dummy HsClientSpecifier to "default". 2023-06-30 11:49:07 +01:00
Ian Jackson 88527d14c8 Merge branch 'fix-unfortunate-merge-outcome' into 'main'
arti-client: Rename KeyStore to Keystore.

See merge request tpo/core/arti!1359
2023-06-30 10:41:58 +00:00
Ian Jackson a7334f86ae Merge branch 'docsrs-fix' into 'main'
Add a missing "experimental-api" rustdoc notation

See merge request tpo/core/arti!1353
2023-06-30 10:41:12 +00:00
Ian Jackson f177a5bde4 Merge branch 'fixup-features' into 'main'
Run fixup-features on current `main`

See merge request tpo/core/arti!1352
2023-06-30 10:38:53 +00:00
Gabriela Moldovan e899c41135 arti-client: Rename KeyStore to Keystore.
`KeyStore` was renamed to `Keystore` globally in !1355. This fixes a
compile error caused an unfortunate series of non-conflicting (from
git's POV) but incompatible merges:

* !1356 added a line threferencing an error variant that capitalizes the
  "s" in "KeyStore" (`ErrorDetail::KeyStore`)
* !1356 landed just before !1355 (the global renaming). Since there was
  no conflict between the 2, we're now in a state where the code added
  in !1356 is referencing an `ErrorDetail` variant that no longer
  exists.
2023-06-30 11:01:58 +01:00
Alexander Færøy 60f6fe7460 Merge branch 'keymgr-naming' into 'main'
keymgr: Rename KeyStore to Keystore globally.

See merge request tpo/core/arti!1355
2023-06-30 00:11:17 +00:00