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
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
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
Nick Mathewson
131d880c7f
Upgrade to latest phf, serde_with, serial_test.
2022-07-19 16:49:44 -04: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
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
1dda69af2b
Remove semver.md files now that 0.5.0 is out
2022-06-24 13:31:38 -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
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
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
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
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
20e41c30fe
base64: Add yet more test cases
2022-06-23 18:32:58 +01:00
Arturo Marquez
b72bf50698
Add some more test cases for base64
...
These tests are borrowed from other parts of the `tor-netdoc`
crate.
2022-06-22 11:30:57 -05:00
Arturo Marquez
87ed48271a
Improve base64 tests
...
Request for changes: `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600#note_2816252 `
2022-06-22 10:34:01 -05:00
Arturo Marquez
4333708384
Add link to upstream issue
...
As per request, here: `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600#note_2816252 `
2022-06-22 09:55:11 -05:00
Arturo Marquez
2d92e9e218
Remove unused `base64` crate
2022-06-21 20:28:58 -05:00
Arturo Marquez
6536ca0f61
Replace `base64` crate with `base64ct` crate
...
Note: the `base64ct` crate rejects invalid characters when the
decoding is done on padded strings. However, the `FromStr` impl
for `B64` can have both padded **and** unpadded inputs, so all
inputs are now padded first, before decoding.
2022-06-21 20:02:33 -05:00
Nick Mathewson
1c5f540dc8
Add a configuration option for reachable_addrs
...
(This doesn't do anything yet.)
2022-06-17 08:47:57 -04:00
Nick Mathewson
fb672dc688
NetDoc: Make AddrPortPattern implement serde traits
...
I'm using serde_with here to just re-use the Display and FromStr
implementations, since those are what has proven easier to type in
the past.
2022-06-17 08:47:57 -04:00
Nick Mathewson
19fa946fc7
Make AddrPortPattern and friends implement Eq and PartialEq
2022-06-17 08:46:16 -04:00
Nick Mathewson
0223c91b26
Merge branch 'high-level-features' into 'main'
...
Add "full" and "experimental" features to arti, arti-client, and below.
Closes #499
See merge request tpo/core/arti!584
2022-06-16 12:24:47 +00:00
Nick Mathewson
bd9bd39ef3
Add one more "allow" to tor_netdoc::parse::macros.
...
Without this, clippy is error-free, but `cargo test` somehow gives a
warning.
2022-06-15 11:52:30 -04:00
Nick Mathewson
8a586a40fa
Add "full" and "experimental" features to arti-client and below.
...
The "full" feature is a catch-all for all features, _except_:
* Those that select a particular implementation (like
tor-llcrypto/with-openssl) or build flag (like "static")
* Those that are experimental or unstable (like "experimental-api")
* Those that are testing-only.
2022-06-10 15:32:21 -04:00
Nick Mathewson
126bf7dace
Netdoc tests: extract decode-base64-ignore-ws code.
2022-06-07 12:45:59 -04:00
Nick Mathewson
d30899d387
microdesc: make sure we recover from an error in the final md.
...
(This is slightly different from recovering from errors in the
middle of a list of mds, since in this case we _can't_ advance to the
next md.)
Also, note that a given branch is probably not reachable.
2022-06-07 12:45:59 -04:00
Nick Mathewson
42d6d02fbe
netdoc: test case for microdesc with no ed25519 id.
...
The "bad-id" microdescriptor is hand-edited based on one from a
Chutney network.
2022-06-07 12:45:57 -04:00
Nick Mathewson
48fff1d735
netdoc: test a couple of accessors for AuthCert.
2022-06-07 12:45:57 -04:00
Nick Mathewson
97c8c27514
Netdoc: test enforcement for items that mustn't take objects.
...
Found via coverage.
2022-06-07 12:45:57 -04:00
Nick Mathewson
c5e56c734d
netdoc: remove an unused method.
2022-06-07 12:45:57 -04:00
Nick Mathewson
41be108b51
netdoc: Test more accessors for tokenized documents.
2022-06-07 12:45:57 -04:00
Nick Mathewson
102600e1c7
Netdoc: add accessor to error for ParseErrorKind
...
The kind type was already public, but we didn't give the user any
way to get it.
2022-06-07 12:45:57 -04:00
Nick Mathewson
171aa5ea00
netdoc: tests for parsing UnvalidatedEdCert.
2022-06-07 12:45:57 -04:00
Nick Mathewson
9641d5ff59
Tests for netdoc RsaPublic type.
2022-06-07 12:45:57 -04:00
Nick Mathewson
07dc49a2dc
Fix a copy-paste error in Ed25519 parsing tests.
...
We accidentally tried to validate (invalid) ed25519 keys
as curve25519 keys.
2022-06-01 08:32:09 -04:00
Nick Mathewson
3de2496303
Add test for parsing bad tor version with too many elements.
...
This is a coverage-driven test.
2022-06-01 08:32:09 -04:00
Nick Mathewson
3e693fa717
Add test for mutability of RelayFamily.
2022-06-01 08:32:09 -04:00
Nick Mathewson
526fd424f7
Tests for tor_netdoc::util::intern
2022-06-01 08:32:09 -04:00
Ian Jackson
4f42101554
lints: Add let_unit_value allow to all crates
...
From running add_warning, with manual picking of the right
hunks/lines.
2022-05-31 15:23:52 +01:00
Ian Jackson
ba0843da4a
lints: Add lint block delimiters to every crate
...
This was the result of:
maint/add_warning crates/*/src/{lib,main}.rs
and then manually curating the results.
2022-05-31 13:00:31 +01:00
Ian Jackson
eb49bc7f46
lints: Suppress unknown lints in a way that works on nightly too
...
This is ridiculous.
2022-05-31 13:00:21 +01:00
Orhun Parmaksız
bfd41ddb5f
Lexically sort Cargo.toml dependencies
...
Utilize cargo-sort: https://github.com/DevinR528/cargo-sort
Signed-off-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
2022-05-28 20:05:51 +03:00
Ian Jackson
0173fce2e9
tor-netdoc: Allow suppressing unknown lints
...
We want to supress the unused_macro_rules lint in one place but it's
new in Nightly and this triggers yet another lint.
2022-05-27 17:36:54 +01:00