summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Apply fs-mistrust to logfile directories.Nick Mathewson2022-05-244-7/+46
| | | |
* | | | Make fs-mistrust configurable from the top level.Nick Mathewson2022-05-247-56/+120
| | | | | | | | | | | | | | | | | | | | | | | | This change requires a little refactoring of TorClientBuilder: now, instead of enabling or disabling mistrust, it enables or disables the decision to _override_ the mistrust in the config.
* | | | Write custom serde impls for Trusted{User,Group}Nick Mathewson2022-05-243-11/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We support all of the following (in TOML notation): ``` user = "rose" # by name user = 413 # by ID user = false # no user user = ":current" # A 'special' user. user = { name: "rose" } user = { id: 413 } user = { special: ":none" } user = { special: ":current" } ```
* | | | Add serde derives for MistrustBuilder.Nick Mathewson2022-05-243-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | The Group and User (de)serialization is pretty ugly, and I can't vouch for the correcness of MistrustBuilder. I will seek feedback before I proceed.
* | | | fs-mistrust: Add Group and User types.Nick Mathewson2022-05-244-24/+196
| | | | | | | | | | | | | | | | | | | | This will help make the actual configuration more serializable, I hope.
* | | | fs-mistrust: make Mistrust have a corresponding Builder type.Nick Mathewson2022-05-2413-157/+221
| | | | | | | | | | | | | | | | | | | | This is an approximately minimal revision to get Builder in place; subsequent commits will clean up the API.
* | | | fs-mistrust: rename fieldsNick Mathewson2022-05-242-15/+15
| |/ / |/| | | | | | | | | | | This renaming will make things slightly simpler for declaring a builder.
* | | Merge branch 'upgrades-20220523' into 'main'Ian Jackson2022-05-242-2/+2
|\ \ \ | | | | | | | | | | | | | | | | Update to newer sanitize-filename and tinystr. See merge request tpo/core/arti!523
| * | | Update to newer sanitize-filename and tinystr.Nick Mathewson2022-05-232-2/+2
| |/ /
* | | Resolve the new `derive_partial_eq_without_eq` lint.Nick Mathewson2022-05-2312-14/+14
| | | | | | | | | | | | It's a little overzealous sometimes, but it's mostly to the good.
* | | Suppress clippy warnings in tor-basic-utils.Nick Mathewson2022-05-232-0/+2
|/ / | | | | | | These are warnings that we've decided it's okay to suppress elsewhere.
* | Merge branch 'remove_dbgs' into 'main'Nick Mathewson2022-05-232-5/+3
|\ \ | | | | | | | | | | | | Remove dbg!()s in tor-config, and fix nightly CI See merge request tpo/core/arti!516
| * | Add a couple of "pub use" to make nightly rustdoc pass.Nick Mathewson2022-05-201-0/+3
| | |
| * | Remove dbg!()s in tor-configNick Mathewson2022-05-201-5/+0
| | | | | | | | | | | | This should satisfy our CI and turn it green again.
* | | Merge branch 'update-min-async-compression' into 'main'eta2022-05-231-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | async-compression minimum version 0.3.5 -> 0.3.14 Closes #473 See merge request tpo/core/arti!521
| * | | async-compression minimum version 0.3.5 -> 0.3.14Jim Newsome2022-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 0.3.14 is the first released version to include https://github.com/Nemo157/async-compression/commit/e7246738762de34bbb820662c3923f8f2610ac95, which fixes https://gitlab.torproject.org/tpo/core/arti/-/issues/473
* | | | add unit tests for arti_client::StreamPrefsmichael mccune2022-05-231-0/+77
|/ / / | | | | | | | | | | | | | | | this change adds unit tests for the public methods of StreamPrefs. although these are mostly "setter" style functions, the tests confirm the basic expectations and operation.
* | | prepare_send_from: clippy: Replace some or_else with orIan Jackson2022-05-231-2/+2
| | |
* | | prepare_send_from: clippy: Have dprintln explicitly return ()Ian Jackson2022-05-231-1/+1
| | |
* | | prepare_send_from: clippy: Avoid a lintIan Jackson2022-05-231-2/+1
| | | | | | | | | | | | I think this is worse code, but it's not *significantly* worse.
* | | prepare_send_from: clippy: Add missing docsIan Jackson2022-05-231-11/+18
| | | | | | | | | | | | I intend to reintroduce this in its own MR.
* | | prepare_send_from: clippy: Replace two unwrapsIan Jackson2022-05-231-2/+6
| | |
* | | prepare_send_from: Break out get_output! macroIan Jackson2022-05-231-2/+11
| | | | | | | | | | | | So we can change unwrap to expect, which makes this too long to repeat.
* | | prepare_send_from: docs and comments improvementsIan Jackson2022-05-231-13/+115
| | | | | | | | | | | | Apropos review.
* | | prepare_send_from: Add testsIan Jackson2022-05-231-0/+122
| | | | | | | | | | | | | | | | | | When I added these tests, they didn't find any bugs in my own implementation, but I did find a bug in futures::future::unfold. See the in-code comment.
* | | channel: Provide and use Sink::prepare_send_fromIan Jackson2022-05-234-75/+322
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a general-purpose implementation of the ad-hoc approach currently taken in (eg) crates/tor-proto/src/channel/reactor.rs, with an API intended to defned against the more obvious mistakes. This allows us to separate the two concerns: the channel reactor can focus on handling channel cells and control messages and is over 2.5x shorter. The complexity of the manual sink implementation, and the machinery needed to avoid having to suspend while holding an item, are dealt with separately. That separate implemenation now has proper documentation. (Tests are in the nest commit to avoid this one being even more unwieldy.) We use `extend` to define this as an extension trait. A competitor is `ext` but in my personal projects I have found `extend` slightly better.
* | Merge branch 'cert_dl_recovery_v3' into 'main'eta2022-05-196-246/+631
|\ \ | | | | | | | | | | | | | | | | | | DirMgr: Revise error handling to better tolerate reset-able failures Closes #412 and #439 See merge request tpo/core/arti!511
| * | Simplify advance and reset functions with mem::replace.Nick Mathewson2022-05-191-8/+4
| | |
| * | Explain why we call update_status unconditionally.Nick Mathewson2022-05-191-0/+3
| | |
| * | Remove BootstrapAction::ImpossibleNick Mathewson2022-05-193-7/+4
| | | | | | | | | | | | It does nothing that Fatal does not. Suggested by @eta in review.
| * | Fix compilation with Rust 1.56.Nick Mathewson2022-05-171-3/+2
| | |
| * | DirMgr: Remove blocking_error return path.Nick Mathewson2022-05-172-53/+29
| | |
| * | DirMgr: Unify error return pathsNick Mathewson2022-05-173-170/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer have separate return paths for recoverable and fatal errors; instead, they are merged, and distinguished based on recovery actions. Since it is now possible for download() to give an error that should _not_ destroy the previous state, it takes `&mut Box<dyn DirState>`. This change unfortunately means that we can no longer call `state = state.advance()`, but instead have to do some mem::swap junk with poisoned values. Any better solution would be a good thing. Additionally, the reset() and advance() methods can no longer fail. There is still a separate return path for reset-triggering errors; I'm about to fix that.
| * | DirMgr: Remove special handling of "changed" booleanNick Mathewson2022-05-172-84/+69
| | |
| * | DirMgr: Start refactoring error handling.Nick Mathewson2022-05-172-3/+96
| | | | | | | | | | | | | | | | | | This commit adds a couple of new error types that we will soon want to distinguish, and a new way of classifying errors. These are not yet all used.
| * | Fix a portability issue with Rust 1.56Nick Mathewson2022-05-161-1/+1
| | |
| * | Give an error if the cache violates If-Modified-Since.Nick Mathewson2022-05-161-7/+24
| | | | | | | | | | | | | | | This should be sufficient to detect several kinds of nefariousness that we'd previously overlooked.
| * | Add missing extend_tolerance to add_consensus_text.Nick Mathewson2022-05-161-0/+1
| | | | | | | | | | | | This should have gone in when we fixed #412
| * | DirMgr: Blame the correct cache for consensus validation failureNick Mathewson2022-05-161-2/+15
| | |
| * | Move consensus signature verification to add-document code.Nick Mathewson2022-05-161-22/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we did this in `advance()`, but that wasn't so great: it meant that we could fail in the advance() code, whereas the calls to `advance()` treated errors as fatal. This treats failed verification as a blocking error that requires a reset. Fixes one aspect of #439.
| * | On a blocking error, blame the appropriate directory cacheNick Mathewson2022-05-162-0/+22
| | | | | | | | | | | | | | | Fortunately, the only error type that we need to handle blocking errors with actually has a DirSource in it already.
| * | DirMgr: Add a way for a state to report a blocking error.Nick Mathewson2022-05-162-7/+26
| | | | | | | | | | | | | | | (A blocking error is one that means that the current bootstrap attempt has failed, and must be restarted.)
| * | Implement nonfatal errors in add_from_*Nick Mathewson2022-05-161-52/+91
| | |
| * | DirMgr: Let add_from_* distinguish non-fatal errorsNick Mathewson2022-05-162-54/+79
| | | | | | | | | | | | | | | | | | | | | Previously all errors were treated as non-fatal. The add_from_* implementations don't yet behave properly; I'll fix them in subsequent commits.
| * | DirMgr: Improve display for DocSourceNick Mathewson2022-05-163-4/+14
| | | | | | | | | | | | (Also, implement Display for tor_dirclient::SourceInfo).
| * | DirMgr: make DocSource useful by having it include dirserver info.Nick Mathewson2022-05-163-22/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously DocSource would tell you whether the document was from a local store or a cache server, but it wouldn't tell you _which_ server it came from. This change required adding DocSource as an argument to DirState::add_from_download.
* | | Placate rustfmtIan Jackson2022-05-171-5/+1
| | | | | | | | | | | | I found the previous layout *much* better. Ah well.
* | | Do backtrace string matching test only on some platforms.Ian Jackson2022-05-171-0/+19
|/ / | | | | | | | | | | "Fixes" #455 by suppressing the test. This is !509 redux.
* | Merge branch 'main' into 'ticket_466'Nick Mathewson2022-05-1637-541/+611
|\ \ | | | | | | | | | # Conflicts: # doc/semver_status.md
| * | Revert "Merge branch 'backtrace' into 'main'"eta2022-05-161-6/+0
| | | | | | | | | This reverts merge request !509