Commit Graph

2094 Commits

Author SHA1 Message Date
Nick Mathewson 514c3a8e62 Use the `zeroize` feature in several crates
Using `zeroize` here tells these crates that they should make
various structures zeroize-on-drop.

(This is not yet implemented in `aes` 0.8.1, but support has been
merged in the repository for `aes`, so it should go out in the next
release.)

No corresponding feature flag is needed to enable zeroize-on-drop
for `rsa` and `*25519-dalek` private keys.
2022-08-01 12:13:05 -04:00
Nick Mathewson b16c042004 Now that versions have bumped, remove semver.md files. 2022-08-01 10:07:12 -04:00
Nick Mathewson dc67c9864b Manually bump the patch version on safelog.
The changes on safelog do not affect its APIs or behavior, so
there is no need to adjust any dependencies.
2022-08-01 10:01:03 -04:00
Nick Mathewson 859ae4acd0 Bump patch versions on crates that have new APIs.
Do _not_ bump the dependency versions on crates that have had no
changes since arti 0.0.5, since those crates do not depend on the
new APIs.

```
cargo set-version -p tor-basic-utils   --bump patch
cargo set-version -p tor-llcrypto      --bump patch
git restore crates/tor-checkable
git restore crates/tor-consdiff
git restore crates/tor-rtmock
```
2022-08-01 09:56:29 -04:00
Nick Mathewson 511cb46997 Bump minor version on crates with deps with breaking changes.
This performs the transitive closure of the last operation:
everything that depends on a crate with a breaking change gets the
version which it depends on bumped.

```
cargo set-version -p tor-proto         --bump minor
cargo set-version -p tor-netdoc        --bump minor
cargo set-version -p arti-hyper        --bump minor
cargo set-version -p arti-bench        --bump minor
cargo set-version -p arti-testing      --bump minor
cargo set-version -p tor-config        --bump minor
```
2022-08-01 09:49:13 -04:00
Nick Mathewson f5dcb98f06 Bump minor versions on all crates that have had breaking changes.
Done with these commands:

```
cargo set-version -p fs-mistrust       --bump minor
cargo set-version -p tor-bytes         --bump minor
cargo set-version -p tor-socksproto    --bump minor
cargo set-version -p tor-cert          --bump minor
cargo set-version -p tor-linkspec      --bump minor
cargo set-version -p tor-cell          --bump minor
cargo set-version -p tor-netdir        --bump minor
cargo set-version -p tor-persist       --bump minor
cargo set-version -p tor-chanmgr       --bump minor
cargo set-version -p tor-guardmgr      --bump minor
cargo set-version -p tor-circmgr       --bump minor
cargo set-version -p tor-dirclient     --bump minor
cargo set-version -p tor-dirmgr        --bump minor
cargo set-version -p arti-client       --bump minor
cargo set-version -p arti              --bump minor
```
2022-08-01 09:43:09 -04:00
trinity-1686a 4f6c23a1da update semver status file 2022-07-30 15:52:45 +02:00
trinity-1686a 19a71534ec fix runtime issues on ios 2022-07-30 15:42:37 +02:00
trinity-1686a 68ad22a985 remove dependancy 'users' on iOS 2022-07-30 11:28:03 +02:00
Nick Mathewson dfdcc97858 Several typo fixes from `typos`. 2022-07-27 10:12:32 -04:00
Nick Mathewson ea8db813ac Fix a rustdoc link in tor-netdir. 2022-07-26 14:18:18 -04:00
Nick Mathewson 14cd423630 tor-dirmgr: Remove opt_netdir entirely.
Its existence tended to hide bugs, and was just asking for trouble.
2022-07-26 10:41:38 +01:00
Nick Mathewson 8d9e0eb334 CircMgr: Remove directory liveness testing. 2022-07-26 10:41:38 +01:00
Nick Mathewson 241427ea3f tor-netdir: Remove latest_netdir method. 2022-07-26 10:41:38 +01:00
Nick Mathewson 1f79e1c49b Update arti-client to new NetDirProvider API.
This allows us to give better errors in the case where bootstrapping
succeeds at first, but fails thereafter for long enough to make our
directory expire.
2022-07-26 10:41:38 +01:00
Nick Mathewson a0c48caa46 CircMgr: Update to new NetDirProvider API
Everything here wants a timely directory, except that it is okay
to build timeout-testing circuits with a stale one.
2022-07-26 10:41:06 +01:00
Nick Mathewson ad577b48f2 ChanMgr: Only update parameters from a timely directory. 2022-07-26 10:41:06 +01:00
Nick Mathewson 0bca4d825c GuardMgr: Update to use new NetDirProvider API. 2022-07-26 10:41:06 +01:00
Nick Mathewson de460b0668 Remove unused DirMgr::netdir method, make opt_netdir private. 2022-07-26 10:41:06 +01:00
Nick Mathewson c39aa5de73 Add new APIs to NetDirProvider to better support timeliness.
Over the years we've found that most callers who want a netdir want
what C Tor calls a "reasonably live" network directory: One that is
not expired by too much, or too far in the future. But a few want a
_strictly_ live directory: one that says it is valid now, with no
tolerances.  And a few want _any_ directory, no matter how expired
it is.

This commit adds net methods to NetDirProvider to provide these
directories.  I think that most use cases will want to explicitly
think about what kind of directory they want, so I've made `netdir`
the simplest method.  I might remove `timely_netdir` by the end of
this branch; see TODO comments.

Part of #518.
2022-07-26 10:40:53 +01:00
eta 7537739a75 Merge branch 'ticket_503' into 'main'
Rename DirSkewTolerance to DirTolerance, download_tolerance to dir_tolerance

Closes #503

See merge request tpo/core/arti!638
2022-07-25 20:21:04 +00:00
trinity-1686a 61eb0c4f35 use Ed25519 identity instead of PublicKey in tor-cert::rsa 2022-07-25 20:46:01 +02:00
trinity-1686a eed8032dbd fix nighly clippy 2022-07-23 20:25:33 +02:00
trinity-1686a 8c28622ecb change usage of PublicKey to Ed25519 in tor-cert
and propagate to other affected crates
2022-07-23 20:07:25 +02:00
trinity-1686a 8def416144 change check_key to take a Option<&_> instead of &Option<_> 2022-07-23 18:38:31 +02:00
Nick Mathewson bc75e6402b Fix compilation of EstablishInto encoding.
It was based on the old `Writeable` API.
2022-07-22 10:30:01 -04:00
Nick Mathewson 3066aeff18 Rename download_tolerance to directory_tolerance
Closes #503.
2022-07-22 10:14:36 -04:00
Nick Mathewson 41104137b1 Rename DirSkewTolerance to DirTolerance
This name is more accurate because we aren't only dealing with
clock skew here: we're also trying to tolerate the case where the
authorities fail to reach consensus for a while.
2022-07-22 10:04:25 -04:00
eta 274bfb94c7 Merge branch 'hs-cells' into 'main'
Implement ESTABLISH_INTRO relay cell

See merge request tpo/core/arti!626
2022-07-22 13:42:50 +00:00
Nick Mathewson 6039461a8a arti-client: Split "Persist" into setup and access variants. 2022-07-21 09:08:33 -04:00
Nick Mathewson fb558fdfb5 arti_client: turn "Proto" error into StreamFailed. 2022-07-21 09:08:33 -04:00
Nick Mathewson 4a97ad4632 arti_client: Split DirMgr error into useful types. 2022-07-21 09:08:33 -04:00
Nick Mathewson fd56ec9698 arti-client: minor edits in error messages and comments 2022-07-21 09:08:33 -04:00
Nick Mathewson cf02d9990c Also downgrade serde_with: Version 2.0 requires Rust 1.60 2022-07-20 11:45:19 -04:00
Nick Mathewson 3ad312320e Downgrade phf back to 0.10
It turns out that phf 0.11 depends on Rust 1.60, which is above our
MSRV.
2022-07-20 10:48:28 -04:00
Jim Newsome 0c82c3f885 disable-fs-permission-checks: remove variable from help message
This option doesn't take an argument. This change drops the argument
from the `--help` message.
2022-07-19 16:04:01 -05:00
Nick Mathewson 131d880c7f Upgrade to latest phf, serde_with, serial_test. 2022-07-19 16:49:44 -04:00
Nick Mathewson 052f3089ca Bump to rusqlite 0.28. 2022-07-19 16:49:44 -04:00
Nick Mathewson 414939bf8c Merge branch 'mistrust-envvar' into 'main'
Move environment-variable checking into fs-mistrust

Closes #483

See merge request tpo/core/arti!630
2022-07-19 20:46:47 +00:00
Nick Mathewson 6f1de00369 Merge branch 'fallible_writers_v2' into 'main'
Revise tor_bytes::Writer::write to return a Result.

Closes #513

See merge request tpo/core/arti!623
2022-07-19 20:29:15 +00:00
eta b96fcd91f2 Merge branch 'eq' into 'main'
tor-cell: Derive Eq for NtorV3Extension

See merge request tpo/core/arti!631
2022-07-19 19:50:51 +00:00
eta d6b0116b71 Apply 1 suggestion(s) to 1 file(s) 2022-07-19 19:33:15 +00:00
Nick Mathewson d2b64642e1 fs-mistrust: accept "n" as "no". 2022-07-19 15:29:24 -04:00
Ian Jackson d89758ace2 Semver tweaks from review.
These aren't user facing comments, but getting them
right will help us write better changelogs.
2022-07-19 15:29:24 -04:00
Nick Mathewson 222d1fea5e arti-client: Remove code related to overriding fs-mistrust.
This logic can now be adjusted via the config object so that it does
its own overriding by looking at the environment as appropriate.
Removing these methods helps simplify the code a bit.

Enabled by #483.
2022-07-19 15:29:24 -04:00
Nick Mathewson f1d99317bd Arti: Use synthetic argument to implement --disable-fs-permission-checks
Now that configuring the environment variables related to fs
permissions works properly, we don't need to use the "override"
feature any more: we can just add the option to the configuration
when appropriate.

With this design, `--disable-fs-permission-checks` is now mostly an
alias for
`--option storage.permissions.dangerously_trust_everyone=true`

Enabled by #483.
2022-07-19 15:21:09 -04:00
Nick Mathewson 8563635a29 Move responsibility for disable-fs-mistrust envvar.
The variable is now handled when building the configuration, and no
longer needs to be special-cased.

Closes #483.
2022-07-19 15:21:09 -04:00
Nick Mathewson 03b5efbd6e fs-mistrust: API to disable based on environment
By default we look at `$FS_MISTRUST_DISABLE_PERMISSIONS_CHECKS`.

Optionally, the user can provide another variable as well, or
disable looking at the environment entirely.
2022-07-19 15:21:09 -04:00
Ian Jackson 76285d8a2e Merge branch 'dormant' into 'main'
Make dormant be a postage::watch

See merge request tpo/core/arti!632
2022-07-19 18:24:05 +00:00
Ian Jackson 44402f722e tor-basic-utils: Add a test for DropNotifyWatchSender 2022-07-19 19:04:34 +01:00