summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | arti-client: fix up launch_onion_service a bit.Nick Mathewson2023-10-031-10/+19
| |/ / | | | | | | | | | Return a stream of requests, and document what to do with them.
* | | Merge branch 'publisher-nickname' into 'main'Alexander Færøy2023-10-033-45/+45
|\ \ \ | | | | | | | | | | | | | | | | tor-hsservice: Make the publisher not require callers to specify the hsid. See merge request tpo/core/arti!1637
| * | | tor-hsservice: Remove a fixed TODO.Gabriela Moldovan2023-10-031-1/+0
| | | |
| * | | tor-hsservice: Make the publisher not require callers to specify the hsid.Gabriela Moldovan2023-10-033-41/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the descriptor publisher needed the `hsid` for logging purposes and for deriving the blinded public keys. This changes the publisher to log the `HsNickname` of the service instead of the hsid, and to read the blinded keys from the keystore.
| * | | tor-hsservice: Make Reactor::compute_time_periods a method.Gabriela Moldovan2023-10-031-4/+4
| | | | | | | | | | | | | | | | | | | | We will soon rewrite this function to load the blinded key from `KeyMgr` (instead of deriving it from `self.hsid_key`).
* | | | Merge branch 'refactor-kdf' into 'main'Nick Mathewson2023-10-032-15/+42
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tor-proto: Refactor the key derivation See merge request tpo/core/arti!1629
| * | | | tor-proto: Refactor the key derivationEmil Engler2023-09-292-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit refactors the key derivation, by applying the following: - The spaghetti slice creation with the hard-to-read boundaries got replaced by a closure, which accepts a length, advances the seed slice by n bytes as a side-effect, and returns the just advanced bytes - The use of `.except` got replaced by an `.or`, with the use of the already existing `InvalidKDFOutputLength` error, thereby removing a potential panic (probably not reachable in runtime though) - The conversion from a slice to a `CircuitBinding` got moved into a `TryFrom` trait of the appropriate data structure
* | | | | Merge branch 'publisher-tests' into 'main'gabi-2502023-10-0312-174/+707
|\ \ \ \ \ | | |/ / / | |/| / / | |_|/ / |/| | | tor-hsservice: Fix hsdesc publisher bugs, add tests See merge request tpo/core/arti!1634
| * | | tor-dirclient: Mark `DirResponse` as `#[must_use]`.Gabriela Moldovan2023-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | Not checking whether the response is successful can have unintended consequences.
| * | | tor-hsservice: Add tests for the descriptor publisher.Gabriela Moldovan2023-10-032-1/+447
| | | |
| * | | tor-hsservice: Make the upload fail if the HSDir responds with an error.Gabriela Moldovan2023-10-031-1/+2
| | | |
| * | | tor-hsservice: Do not discard the error source.Gabriela Moldovan2023-10-031-3/+3
| | | | | | | | | | | | | | | | | | | | We were previously converting the RequestFailedError to a RequestError, which discards the error source.
| * | | tor-dirclient: Set a non-zero expected response len for uploads.Gabriela Moldovan2023-10-031-5/+5
| | | |
| * | | tor-hsservice: Mock the client circ and data stream.Gabriela Moldovan2023-10-031-2/+26
| | | |
| * | | tor-hsservice: Abort the upload task if all HSDirs have the latest descriptor.Gabriela Moldovan2023-10-031-0/+5
| | | |
| * | | tor-hsservice: Rewrite map() as a for-loop (fmt).Gabriela Moldovan2023-10-032-111/+112
| | | |
| * | | tor-hsservice: Rewrite map() as a for-loop.Gabriela Moldovan2023-10-031-8/+2
| | | | | | | | | | | | | | | | | | | | This fixes a clippy complexity warning. It also makes the code more readable, IMO.
| * | | tor-hsservice: Add trace-level logs for the desc publisher.Gabriela Moldovan2023-10-031-0/+10
| | | |
| * | | tor-hsservice: Fix deadlock.Gabriela Moldovan2023-10-031-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When called by `Reactor::upload_all()`, `Reactor::netdir()` deadlocks (`netdir()` needs to acquire the `inner` lock, but `inner` is already held by `upload_all`). Since `netdir()` is only called in `upload_all()`, let's fix the deadlock by inlining it at the callsite.
| * | | tor-hsservice: Fix publisher state not being updated.Gabriela Moldovan2023-10-031-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The publisher was stuck in the `AwaitingIpts` state because of a logic bug in the `update_publisher_state` function. The publisher now breaks out of the `AwaitingIpts` state upon receiving new IPTs from the IPT manager.
| * | | tor-netdir: Fix broken condition.Gabriela Moldovan2023-10-031-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The statement ``` if hsids.all(|(_hsid, period)| rings.any(|(_, _, tp)| tp == period)) { ``` had 2 bugs: * the condition is reversed (it should be negated: we need to bail if one of the specified `hsids` cannot be found on any of our rings) * `rings.any()` mutates the `rings` iterator, causing `hs_dirs_upload` to return fewer HSDirs than expected
| * | | tor-hsservice: Log a warning if the publisher reactor shuts down.Gabriela Moldovan2023-10-032-3/+8
| | | |
| * | | tor-hsservice: Rename the real version of the publisher mockable state.Gabriela Moldovan2023-10-033-15/+7
| | | | | | | | | | | | | | | | | | | | This renames `ReactorState` to `Real`, for consistency with `ipt_mgr`, which calls the real version of its mockable state `Real`.
| * | | tor-hsservice: Make the publisher generic over the mockable state (circpool ↵Gabriela Moldovan2023-10-033-16/+20
| | | | | | | | | | | | | | | | provider).
| * | | tor-keymgr: Implement ArtiNativeKeystore::insert for public keys.Gabriela Moldovan2023-10-031-3/+7
| | | |
| * | | tor-hsservice: Add more key roles.Gabriela Moldovan2023-10-032-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | This adds a couple of new `HsSvcKeyRoles` for: * `KS_hs_id` keypairs * `KP_hs_blind_id` public keys keys
| * | | tor-proto: Fix clippy warning.Gabriela Moldovan2023-10-031-1/+1
| | | |
| * | | tor-hsservice: Remove unnecessary allow annotations.Gabriela Moldovan2023-10-031-2/+0
| | | |
* | | | tor-hsservice: Provide IptsPublisherUploadViewIan Jackson2023-10-031-0/+42
|/ / /
* | | Remove semver.md files now that 1.1.9 is out.Nick Mathewson2023-10-029-18/+0
| | |
* | | tor-hsservice should depend on an explicit version of tor-bytes.arti-v1.1.9Nick Mathewson2023-10-021-1/+1
| | |
* | | Enable publication on tor-hsservice.Nick Mathewson2023-10-021-2/+0
| | |
* | | Bump tor-dirclient patchlevel, since its dependency changed.Nick Mathewson2023-10-024-4/+4
| | |
* | | Update other cargo.lock files.Nick Mathewson2023-10-022-3/+3
| | |
* | | Patchlevel bumps to crates whose dependencies just changed.Nick Mathewson2023-10-0219-25/+25
| | | | | | | | | | | | (The only change in these crates is that their dependencies changed.)
* | | Minor-version bumps, for crates with breaking changes.Nick Mathewson2023-10-0216-40/+40
| | |
* | | Patchlevel bumps, with dependents affected.Nick Mathewson2023-10-0234-123/+123
| | |
* | | Trivial version bumps: patchlevel only.Nick Mathewson2023-10-023-3/+3
| | | | | | | | | | | | | | | These crates have had changes that do not require their dependents to require a later version.
* | | Run "fixup-features" on arti crates.Nick Mathewson2023-10-026-6/+6
|/ /
* | tor-hsrproxy: Fix relative documentation warningEmil Engler2023-09-301-2/+2
| | | | | | | | | | This commit fixes a warning in the documentation, caused by an unresolved name.
* | Merge branch 'misc-upgrades' into 'main'Nick Mathewson2023-09-2810-30/+26
|\ \ | | | | | | | | | | | | Upgrade several dependencies See merge request tpo/core/arti!1626
| * | Remove direct dependency on generic-arrayNick Mathewson2023-09-286-21/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of tying ourselves to a particular version of the generic-array crate, we now always use the version re-exported by our RustCrypto crates. This lets us avoid the possibility of version mismatch. (Originally I had planned to upgrade to generic-array 1.0, but then I found that we were not actually using it.)
| * | Upgrade async_executors dependency to 0.7.0Nick Mathewson2023-09-282-6/+11
| | |
| * | Upgrade memmap2 dependency to 0.8.0Nick Mathewson2023-09-281-1/+1
| | |
| * | Upgrade event_listener dependency to 3.0.0Nick Mathewson2023-09-282-2/+2
| | |
* | | tor-proto: Replace repeating pattern with fillEmil Engler2023-09-281-6/+2
|/ / | | | | | | | | | | | | | | | | This commit replaces a repeating code pattern in the `set_digest` function for setting the 'Recognized' and Digest field to zero with a slice fillment. Besides this, it also adds comments explaining which fields are currently getting zeroized.
* | hsrproxy: detect shutdown correctly.Nick Mathewson2023-09-271-6/+23
| |
* | hsrproxy: improve error handling somewhatNick Mathewson2023-09-272-34/+113
| | | | | | | | | | With this patch we now propagate errors upwards rather than handling them at the lowest possible level.
* | rproxy: Implement the actual "proxy" part of the code.Nick Mathewson2023-09-271-10/+78
| | | | | | | | | | Now we finally have the code to copy the data back and forth on the two AsyncRead+AsyncWrite objects that we create.
* | hss: Remove OnionServiceDataStram type.Nick Mathewson2023-09-272-18/+4
| | | | | | | | | | | | | | I think that the reason we added this was in case we needed different behavior from DataStream; but on reflection it does seem that we don't. Having a single type here will make things a bit simpler.