Commit Graph

3873 Commits

Author SHA1 Message Date
Nick Mathewson 1735b70769 Note semver break in tor-guardmgr::Error. 2022-07-07 13:20:57 -04:00
Nick Mathewson 3a2631ff9e Remove now-unused NoGuardsUsable case. 2022-07-07 13:16:06 -04:00
Nick Mathewson 287fe915f9 Improve message for failure to select a guard.
This uses similar techniques to the commit I just did for Fallbacks.
2022-07-07 13:16:06 -04:00
Nick Mathewson d7a626aaa8 Add more information to failed-to-select fallback errors.
Also re-order the filters to be a little more logical.
2022-07-07 13:16:06 -04:00
Nick Mathewson fecc57fbef FilterCount: Add a simple Display helper.
This is a helper rather than a Display implementation because it
isn't the only logical way to display these values.  (In fact,
without context, it isn't even the _most_ logical way)
2022-07-06 15:39:30 -04:00
Nick Mathewson b6e0eea2b0 New "counting filter" iterator helper in tor-basic-utils.
This is going to make it simpler to write the code in guardmgr (and
later in circmgr) that keeps track of how many relays were rejected
for what reason.  The latter, in turn, should improve error messages
when we're unable to pick a guard or a path.
2022-07-06 15:39:14 -04:00
Nick Mathewson 373b9e2ccf GuardMgr: tweak an error message. 2022-07-06 15:39:14 -04:00
Ian Jackson 6878e3a2d4 Merge branch 'update-rsa-v2' into 'main'
Update `rsa` dependency (and use `x25519-dalek` prerelease)

Closes #448

See merge request tpo/core/arti!612
2022-07-06 14:42:26 +00:00
eta c2e2da5dc3 Update `rsa` dependency (and use `x25519-dalek` prerelease)
- arti#448 and arti!607 highlight an issue with upgrading `rsa`: namely,
  the `x25519-dalek` version previously used has a hard dependency on
  `zeroize` 1.3, which creates a dependency conflict.
- However, `x25519-dalek` version `2.0.0-pre.1` relaxes this dependency.
  Reviewing the changelogs, it doesn't look like that version is
  substantially different from the current one at all, so it should be
  safe to use despite the "prerelease" tag.
- The new `x25519-dalek` version also bumps `rand_core`, which means we
  don't have to use the RNG compat wrapper in `tor-llcrypto` as much.

closes arti#448
2022-07-06 14:57:45 +01:00
Ian Jackson 993c0cbe98 Merge branch 'b64t' into 'main'
tor-netdoc: b64 tests: add exhaustive roundtrip test

See merge request tpo/core/arti!613
2022-07-06 12:08:00 +00:00
Ian Jackson 9318e8712a Fix clippy needless deref 2022-07-06 12:05:57 +01:00
Ian Jackson 8f63c07b5f tor-netdoc: b64 tests: add exhaustive roundtrip test 2022-07-06 12:04:23 +01:00
Ian Jackson 372ff61552 Merge branch 'add-arti-hyper-unit-tests' into 'main'
Add some unit tests for arti-hyper

See merge request tpo/core/arti!615
2022-07-06 10:15:38 +00:00
spongechameleon 1242925e68 Add unit tests for arti-hyper's uri -> host,port,tls conversion 2022-07-05 13:45:41 -06:00
Nick Mathewson ccbf28c248 Merge branch 'openssl' into 'main'
cargo update - fix openssl

See merge request tpo/core/arti!617
2022-07-05 17:49:10 +00:00
Ian Jackson a032137cad cargo update
This fixes a complaint from cargo audit about
  https://rustsec.org/advisories/RUSTSEC-2022-0032
in openssl.
2022-07-05 17:52:28 +01:00
Ian Jackson a63d540d68 Merge branch 'bump-base64ct' into 'main'
Bump `base64ct` crate `1.5.0` -> `1.5.1`

See merge request tpo/core/arti!608
2022-07-05 13:36:48 +00:00
Nick Mathewson 56f931e8e1 Merge remote-tracking branch 'origin/mr/610' 2022-07-05 09:10:10 -04:00
Richard Pospesel 61119d5004 Fixed typo in convert_curve25519_to_ed25519_private comments 2022-06-29 16:52:59 +00:00
Nick Mathewson 0b268e3d7a Merge branch 'typos' into 'main'
Fix typo

See merge request tpo/core/arti!609
2022-06-28 20:52:30 +00:00
Dimitris Apostolou e5175a2178
Fix typo 2022-06-28 14:40:25 +03:00
Arturo Marquez af4970ec1f
Bump `base64ct` crate `1.5.0` -> `1.5.1`
This new release checks for invalid symbols in non-padded inputs
for decoding. Therefore, we can get rid of the logic implemented
in `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600`
2022-06-27 23:10:58 -05:00
Nick Mathewson 0127ef7bee Add links to 0.5.0 changelog. 2022-06-24 14:42:28 -04:00
Nick Mathewson 1dda69af2b Remove semver.md files now that 0.5.0 is out 2022-06-24 13:31:38 -04:00
Nick Mathewson f22a3ee10c Finish the 0.5.0 changelog. 2022-06-24 12:25:09 -04:00
Nick Mathewson 20435aea75 Bump crate and dependency versions.
These were done with the following commands:

```
cargo set-version -p tor-basic-utils   --bump patch
cargo set-version -p fs-mistrust       --bump minor
cargo set-version -p tor-error         --bump patch
cargo set-version -p tor-config        --bump patch
cargo set-version -p tor-units         --bump patch
cargo set-version -p tor-rtcompat      --bump minor
cargo set-version -p tor-llcrypto      --bump patch
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-cell          --bump minor
cargo set-version -p tor-proto         --bump minor
cargo set-version -p tor-netdoc        --bump patch
cargo set-version -p tor-netdir        --bump minor
cargo set-version -p tor-persist       --bump patch
cargo set-version -p tor-chanmgr       --bump minor
cargo set-version -p tor-guardmgr      --bump minor
cargo set-version -p tor-circmgr       --bump patch
cargo set-version -p tor-dirclient     --bump patch
cargo set-version -p tor-dirmgr        --bump minor
cargo set-version -p arti-client       --bump patch
cargo set-version -p arti              --bump minor
cargo set-version -p arti-bench        --bump minor
cargo set-version -p arti-testing      --bump minor
```
2022-06-24 12:00:22 -04:00
Nick Mathewson d5170d5318 Increment versions of crates with trivial changes only.
"Trivial" here includes stuff like cargo reformatting, comment
edits, error message string changes, and clippy warning changes.
Crates that depend on these do not need to increment.
2022-06-24 11:43:02 -04:00
Nick Mathewson b63e143321 Merge branch 'changelog' into 'main'
changelog: mention unknown config item messages

See merge request tpo/core/arti!605
2022-06-24 14:36:46 +00:00
Ian Jackson 4831f9d38c Merge branch 'clippy' into 'main'
Fix clippy nightly again

See merge request tpo/core/arti!603
2022-06-24 14:13:58 +00:00
Ian Jackson df54ab21e7 changelog: mention unknown config item messages 2022-06-24 14:51:13 +01:00
Nick Mathewson 1f8f24dbcb Merge branch 'dirmgr' into 'main'
dirmgr: followups to !587, mostly using iterators

Closes #468

See merge request tpo/core/arti!599
2022-06-24 13:46:52 +00:00
Nick Mathewson 05358d55b2 Start a changelog for Arti 0.5.0 2022-06-24 09:38:20 -04:00
Ian Jackson b7c03943f1 maint/add_warning: Fix parsing of --check
Previously this would eat the first filename!
2022-06-24 14:23:38 +01:00
Ian Jackson 23c352b96b clippy: Consolidate many lints in maint/add_warning
Found these by disabling the nightly dbg macro special case.  Now, we
have a mechanism for globally adding suppressions to tests, we can use
that instead.
2022-06-24 14:23:38 +01:00
Ian Jackson d965dc3f70 clippy: Add standard test lint block to several examples 2022-06-24 14:23:38 +01:00
Ian Jackson bebf013bef maint/add_warning: Add two lints via add_warning as a test case 2022-06-24 14:23:38 +01:00
Ian Jackson 72515abf91 maint/add_warning: Add ability maintain test lint blocks 2022-06-24 14:23:38 +01:00
Ian Jackson 76ff330610 maint/add_warning: Scan all files by default, but insist only in some
This will allow us to have add_warning manage test lint blocks.

We have to stop printing all the filenames because there are too
many.  Filenames still come out on error of course.
2022-06-24 14:23:34 +01:00
eta ec3e1f2ada Merge branch 'error_cleanup_2' into 'main'
Error refactoring: bytes, cert, proto.

See merge request tpo/core/arti!604
2022-06-24 13:01:42 +00:00
Nick Mathewson ea3160737c Fix a couple of typos in rustdoc comments. 2022-06-24 08:18:15 -04:00
Nick Mathewson ce4d062c09 Update README.md files from rustdoc. 2022-06-24 08:02:56 -04:00
Nick Mathewson da0e199bd3 Run cargo upgrade in preparation for release. 2022-06-24 07:55:26 -04:00
Nick Mathewson 38004a4f4d tor-proto: split and elaborate tor_bytes::Error instances
Some of these were for decoding particular objects (we now say
what kind of objects), and some were unrelated tor_cert errors that
for some reason we had shoved into a tor_bytes::Error.

There is now a separate tor_cert::CertError type, independent from
tor_cert's use of `tor_bytes::Error` for parsing errors.
2022-06-23 15:42:45 -04:00
Nick Mathewson 35b7b8a47a tor-proto: Split CellErr based on activity.
Failing to encode is fundamentally different from failing to
decode. We now treat those separately, and describe _what_ we failed
to encode or decode.
2022-06-23 14:59:52 -04:00
Ian Jackson b1aab512ff Merge branch 'tor-netdoc/use-base64ct' into 'main'
Replace `base64` crate with `base64ct` crate in `tor-netdoc`

See merge request tpo/core/arti!600
2022-06-23 18:52:14 +00:00
Nick Mathewson 92fd9fb0de tor-proto: clean up error names and messages
This avoids adding additional information for now; that will come on
the next commits.
2022-06-23 14:35:26 -04:00
Ian Jackson 2ed2fc4ac7 base64: Move some tests into a separate function, placating clippy 2022-06-23 19:21:55 +01:00
Ian Jackson 589c6e52bb Run maint/add_warning crates/*/src/{lib,main}.rs
Update all lint blocks
2022-06-23 19:15:42 +01:00
Ian Jackson 13e27919c5 clippy: Supresss clippy::significant_drop_in_scrutinee
As per the linked discussion.
2022-06-23 19:14:54 +01:00
Ian Jackson 28dea73523 lints: Scheme for allowing us to name nightly lints
As per
  https://gitlab.torproject.org/tpo/core/arti/-/issues/501
2022-06-23 19:14:11 +01:00