Nick Mathewson
23d36abadc
Merge branch 'guardmgr-error-cleanup' into 'main'
...
GuardMgr: Improve and revamp error types and messages.
See merge request tpo/core/arti!619
2022-07-08 14:25:41 +00:00
Nick Mathewson
51a59e8c8b
Add a semver note to FilterCount
2022-07-08 09:29:09 -04:00
Nick Mathewson
033a05a9af
Merge branch 'generate_cert' into 'main'
...
Implement functionality to construct signed Ed25519 certs.
Closes #511
See merge request tpo/core/arti!611
2022-07-08 13:25:29 +00:00
eta
7c2f2e9f8d
Merge branch 'dirclient-error-cleanup' into 'main'
...
Small cleanups to errors in tor-dirclient
See merge request tpo/core/arti!620
2022-07-08 10:22:09 +00:00
Nick Mathewson
82766e74e4
Improve display for tor-dircache errors.
...
These errors no longer use Debug to dump the `Option<SourceInfo>`, but
instead produce reasonable text. Also, I've fixed the SourceInfo
Display implementation so that it now says that it got the error
"from $source via $circuit" rather than the other way around.
2022-07-07 14:07:04 -04:00
Nick Mathewson
d681967b61
dirclient: Generalize MdSha256Empty to EmptyRequest.
...
(It makes sense to use this for things that are not in fact lists of
SHA256 digests of Microdescriptors.)
2022-07-07 14:07:04 -04:00
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
357606a479
Merge branch 'chanmgr-error-cleanup' into 'main'
...
ChanMgr: Add more contextual info to error types.
See merge request tpo/core/arti!616
2022-07-06 17:26:49 +00:00
eta
0537e88d80
Merge branch 'persist-error-cleanup' into 'main'
...
tor-persist: Big refactoring on Error type.
See merge request tpo/core/arti!614
2022-07-06 17:20:43 +00:00
Nick Mathewson
7213c4a45f
Add a semver note.
2022-07-06 11:51:28 -04:00
Nick Mathewson
dd491931c8
ChanMgr: errors: attribute errors to correct address.
...
Even when keys are relevant, we still don't want to attribute errors
to a set of addresses when we have a single address that we're
connected with.
2022-07-06 11:51:28 -04:00
Nick Mathewson
bc9db9b84c
ChanMgr: Add more contextual info to error types.
...
Now each type has a peer. In some cases this peer is just an
address, whereas in others (where key is relevant or address isn't
yet narrowed down) it's a full OwnedChanTarget.
2022-07-06 11:51:28 -04:00
Nick Mathewson
853aed6859
tor-persist: Big refactoring on Error type.
...
Every error now has an action (what we were trying to do), a
resource (what we were trying to do it to), and a source (what
problem we encountered).
Initially I tried to add "action" and "resource" fields to error
variants individually, but that led to a combinatorial explosion.
Part of #323 .
2022-07-06 11:47:17 -04:00
Nick Mathewson
48e44b0140
Implement functionality to construct signed Ed25519 certs.
...
This is behind a feature flag, since it isn't needed for pure
clients: only onion services and relays need this.
I've named the object that constructs these certs
`Ed25519CertConstructor` because it doesn't follow the builder
pattern exactly: mainly because you can't get an Ed25519Cert out of
it. _That_ part is necessary because we require that an Ed25519Cert
should only exist if the certificate was found to be well-signed
with the right public key.
Closes #511 .
2022-07-06 11:11:04 -04:00
Nick Mathewson
56fefd7adf
tor-llcrypto: expose the Signer API from ed25519-dalek
2022-07-06 11:11:04 -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
Nick Mathewson
aeef36a538
tor-persist: Move Error to a module.
2022-07-06 11:38:10 +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