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
Ian Jackson
e59fa141b7
ci: Pass --cfg ci_arti_stable to stable clippy
...
We're going to use this to control lints etc.
2022-06-23 19:13:47 +01:00
Ian Jackson
6c110a232c
dirmgr: Use ... .find().is_none() rather than clippy's suggestion
2022-06-23 18:42:33 +01:00
Ian Jackson
20e41c30fe
base64: Add yet more test cases
2022-06-23 18:32:58 +01:00
Nick Mathewson
f699988c41
tor-bytes: Split EncodeError from Error
...
Since there is currently only one error type that can occur when
encoding, it doesn't make sense to use the full Error type here.
This split will help us downstream, as we no longer need to
categorize tor_bytes::Error as "an error in encoding or decoding".
I considered renaming Error to DecodeError, but that had pretty huge
downstream effects, and didn't seem to be worth it.
2022-06-23 08:58:25 -04:00
Nick Mathewson
210f3f1587
Merge branch 'error_cleanup' into 'main'
...
Error cleanup, part 1
See merge request tpo/core/arti!601
2022-06-22 19:43:50 +00:00
Nick Mathewson
813a648ce2
fs-mistrust: convert Io error variant to a struct.
2022-06-22 15:21:34 -04:00
Nick Mathewson
0369995364
tor-cell: convert BytesErr to a struct variant
2022-06-22 15:21:12 -04: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
Nick Mathewson
c3da82fc2d
tor-cell: error usefulness and style fixes
2022-06-22 10:02:42 -04:00
Nick Mathewson
e3e922d03f
Improve error messages in tor-checkable.
2022-06-22 09:48:42 -04:00
Nick Mathewson
5577163387
tor-socksproto: Style and info fixes in errors.
...
(The use of Cow<> in the error message isn't strictly necessary
here, but it's a pattern I want to encourage.)
2022-06-22 09:16:44 -04:00
Nick Mathewson
3120f1092a
Style fixes to tor-bytes errors.
...
Also note an issue with the design of tor-bytes::Error that should
probably go in a separate MR.
2022-06-22 09:00:59 -04:00
Nick Mathewson
7163b7dcc0
Style fixes to tor-protover errors.
2022-06-22 08:50:44 -04:00
Nick Mathewson
f6d6ac7fe9
tor-llcrypto: style fixes on BlindingError
2022-06-22 08:47:18 -04:00
Nick Mathewson
9ba7750dfe
Style fixes to tor-units errors.
2022-06-22 08:42:13 -04:00
Nick Mathewson
bf2336e547
Style fixes to tor-events errors.
2022-06-22 08:39:44 -04:00
Nick Mathewson
c39631af27
tor-config: style fixes on CfgPathError.
2022-06-22 08:36:13 -04:00
Nick Mathewson
37cbd38abc
tor-config: Don't format source error as part of error message
...
This is one I missed earlier.
2022-06-22 08:23:33 -04:00
Nick Mathewson
48653df68f
Style fixes to retry-error error messages.
2022-06-22 08:11:44 -04:00
Nick Mathewson
9102948045
Style fixes to safelog errors.
2022-06-22 08:07:37 -04:00
Nick Mathewson
326ab1a7ae
Editorial improvements on fs-mistrust errors
...
These changes make sure that the errors conform to our preferred
style, and include a description of what exactly we were doing when
something went wrong.
2022-06-22 08:03:15 -04:00
Ian Jackson
d2bd71c5f0
dirmgr: DirBootstrapStatus: Refactor mut_status_for using entries_mut
...
IMO this is rather less confusing.
2022-06-22 10:53:02 +01:00
Ian Jackson
d36c433b36
dirmgr: Use new statuses() helper method
...
The two call sites become clearer, IMO.
2022-06-22 10:53:02 +01:00
Ian Jackson
24d43f83fd
dirmgr: DirBootstrapStatus: Provide statuses and entries_mut
...
We're going to use these in a moment.
One returns entries and the other statuses simply because that's
what's actually going to be wanted.
2022-06-22 10:53:02 +01:00
Ian Jackson
5c51d03efb
dirmgr: Remove a TODO comment
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/587#note_2815945
2022-06-22 10:53:02 +01: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
eta
4e3537746f
Merge branch 'display_source_cleanup' into 'main'
...
Do not include error source() in display() format.
See merge request tpo/core/arti!598
2022-06-21 19:34:27 +00:00
Ian Jackson
9b4ba4893e
Merge branch 'stalled_directory' into 'main'
...
Detect and report stalled directory downloads
Closes #468
See merge request tpo/core/arti!587
2022-06-21 19:13:40 +00:00
Ian Jackson
0bd375cb34
Merge branch 'channel' into 'main'
...
Plumb channel padding timing parameters from netdir to tor-proto
See merge request tpo/core/arti!586
2022-06-21 18:37:27 +00:00
Ian Jackson
da2e53bf76
tor-chanmgr: Change to use unwrap_void
...
As per discussion in
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813573
2022-06-21 19:19:28 +01:00
Ian Jackson
a2614729a4
channel padding: Rename ChannelsParams from ChannelsConfig (rustfmt)
...
Consequential ordering changes.
2022-06-21 19:19:28 +01:00
Ian Jackson
7d676cde02
channel padding: Rename ChannelsParams from ChannelsConfig
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2814276
Change names and comments and docs everywhere.
2022-06-21 19:19:28 +01:00
Ian Jackson
ff228e5d9c
channel padding: chanmgr: Clarify a comment
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813574
2022-06-21 19:19:28 +01:00
Ian Jackson
65e6683b0b
tor-proto: Have Channel::reconfigure throw ChannelClosed
...
Addresses
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/586#note_2813567
2022-06-21 19:19:28 +01:00
Ian Jackson
13ca24ba3a
tor-proto: err: Provide ChannelClosed as a separate unit error
2022-06-21 19:19:28 +01:00