summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | tor-circmgr: partially port mgr tests to MockRuntimeSaksham Mittal2023-11-141-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | MockSleepRuntime wraps a MockRuntime instead of using test_with_one_runtime!(), so the tests should be more deterministic
| * | | tor-circmgr: partially port test_double_timeout() to MockRuntimeSaksham Mittal2023-11-141-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests still use MockSleepRuntime for the more complicated tests where we forcefully make one or both futures time out, but MockSleepRuntime wraps a MockRuntime instead of using test_with_all_runtimes!(), so the tests should be more deterministic
| * | | tor-circmgr: fix build_*_timeout() for MockRuntime portSaksham Mittal2023-11-141-8/+5
| | | | | | | | | | | | | | | | | | | | The funky thing was getting rid of the Canceled error from the channel and returning the actual error from build_owned() properly
| * | | tor-circmgr: have FakeCirc derive DebugSaksham Mittal2023-11-111-5/+2
| | | |
| * | | tor-circmgr: Port some build_* tests to MockRuntimeSaksham Mittal2023-11-111-15/+27
| |/ / | | | | | | | | | build_modest_timeout() and build_huge_timeout() don't pass yet
* | | tor-hsservice: Downgrade TODO HSS to TODO.Gabriela Moldovan2023-11-131-1/+1
| | |
* | | tor-hsservice: Remove some `allow`s we don't need anymore.Gabriela Moldovan2023-11-131-4/+0
|/ /
* | Merge branch 'send_msg_but_no_handler' into 'main'Nick Mathewson2023-11-091-2/+3
|\ \ | | | | | | | | | | | | | | | | | | Make conversation::send_message work without an error. Closes #1085 See merge request tpo/core/arti!1726
| * | circuit: On SendMsgAndInstallHandler, tolerate None handlerNick Mathewson2023-11-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously it was possible for `handler` to be None only when `msg` was also None, which would make SendMsgAndInstallHandler into a no-op. Now, if `msg` is present but `handler` is absent, we use the previously installed handler, which I think was our intention. Without this patch, `Conversation::send_message` simply won't work. Fixes #1085.
| * | circuit::reactor: Remember that meta_handler is Send.Nick Mathewson2023-11-021-2/+2
| | | | | | | | | | | | | | | | | | (We already require that it is Send when the client gives it to us in circuit.rs, but we had previously forgotten that when we stored it in the Reactor.)
* | | Merge branch 'time-store' into 'main'Ian Jackson2023-11-025-7/+430
|\ \ \ | | | | | | | | | | | | | | | | Provide module for handling storage of times on disk See merge request tpo/core/arti!1723
| * | | tor-hsservice: time_store: Add TODO HSS re serialisationsIan Jackson2023-11-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1723#note_2960861 https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1723#note_2961013
| * | | tor-hsservice: time_store: Slight structural tidyingIan Jackson2023-11-021-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1723#note_2960877 and following some IRC discussion.
| * | | HSS time_store: clarify by removing a commagabi-2502023-11-021-1/+1
| | | |
| * | | tor-hsservice: New time_store module (provide accessors)Ian Jackson2023-11-011-2/+43
| | | | | | | | | | | | | | | | These are the logically necessary accessors.
| * | | tor-hsservice: New time_store moduleIan Jackson2023-11-012-0/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found time handling in IPT persistence very confusing to think about, so I propose to deal with all of the hard questions in a module. Again we have a doctest so use the technique we used for having timeout_track not be semver-exposed.
| * | | tor-rtmock: MockRuntimeBuilder: new sleep_provider() setterIan Jackson2023-11-012-1/+11
| | | |
| * | | tor-rtmock: simplify/reorganise MockRuntimeBuilder::buildIan Jackson2023-11-011-4/+3
| | | | | | | | | | | | | | | | | | | | Always reify a default SimpleMockTimeProvider, and then apply the starting_wallclock to it. This will make the next change fit.
| * | | tor-hsservice: timeout_track: Remove some unnecessary allowsIan Jackson2023-11-011-3/+1
| | | | | | | | | | | | | | | | Retain the TODO for making this properly pub somewhere.
* | | | tor-keymgr: Add TODO about adding helper for implementing KeyDenotator.Gabriela Moldovan2023-11-021-0/+2
| | | |
* | | | tor-keymgr: Map all errors to KeystoreCorruptionError (fmt).Gabriela Moldovan2023-11-021-4/+2
| | | |
* | | | tor-keymgr: Map all errors to KeystoreCorruptionError.Gabriela Moldovan2023-11-021-2/+2
| | | |
* | | | tor-keymgr: Use KeystoreCorruptionError instead of internal!.Gabriela Moldovan2023-11-021-3/+3
| | | |
* | | | tor-keymgr: Add an error type for keystore corruption (fmt).Gabriela Moldovan2023-11-022-4/+4
| | | |
* | | | tor-keymgr: Add an error type for keystore corruption.Gabriela Moldovan2023-11-022-1/+30
| | | |
* | | | tor-keymgr: Use ArrayVec to avoid an unnecessary allocation.Gabriela Moldovan2023-11-022-2/+4
| | | |
* | | | tor-keymgr: Use parse() instead of from_str().Gabriela Moldovan2023-11-021-5/+3
| | | |
* | | | tor-keymgr: Add TODO about supporting multiple key denotators.Gabriela Moldovan2023-11-021-0/+5
| | | |
* | | | tor-keymgr: Add test for the KeyDenotator impl for TimePeriod.Gabriela Moldovan2023-11-021-0/+11
| | | |
* | | | tor-keymgr: Remove unused KeyDenotator::glob() function.Gabriela Moldovan2023-11-021-11/+0
| | | | | | | | | | | | | | | | | | | | We no longer need this function now that we always match the entire denotator rather than its individual components,
* | | | tor-keymgr: Add test for ArtiPath denotator validation.Gabriela Moldovan2023-11-021-0/+22
| | | |
* | | | tor-keymgr: Update the test for paths with `+` as a disallowed char.Gabriela Moldovan2023-11-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | `'+'` is now allowed to occur once within an `ArtiPath` (but **not** within an `ArtiPathComponent`), so we need to special case the `"c++"` test.
* | | | tor-hsservice: Use KeyDenotator::decode instead of manually decoding the ↵Gabriela Moldovan2023-11-021-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | denotator. Note that instead of matching each individual component of a key denotator (e.g. using a glob pattern like `*_*_*`), we now match the entire denotator (using the `*` pattern) and let `KeyDenotator::decode` handle its parsing. In the long run, this approach should reduce code duplication (as the decoding logic for each type is centralized in its `KeyDenotator` implementation) and the need for complex glob patterns. Closes #1070
* | | | tor-keymgr: Use the new denotator separator instead of underscore.Gabriela Moldovan2023-11-022-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Underscores are used within `ArtiPath`s as visual separators. To reduce ambiguity, we now use a different character for separating the key denotators (e.g. time periods) from the rest of the `ArtiPath`. Closes #1063
* | | | tor-keymgr: Add a constant for the denotator separator.Gabriela Moldovan2023-11-022-1/+9
| | | |
* | | | tor-keymgr: Remove now-outdated TODOs.Gabriela Moldovan2023-11-021-4/+0
| | | |
* | | | tor-keymgr: Rename KeyDenotator::display() to KeyDenotator::encode().Gabriela Moldovan2023-11-021-5/+5
| | | | | | | | | | | | | | | | | | | | This renames the serialization function to `encode()` for consistency with its `KeyDenotator::decode()` counterpart.
* | | | tor-keymgr: Add KeyDenotator::decode for decoding key denotators.Gabriela Moldovan2023-11-021-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `KeyDenotator::decode` will soon replace the ad-hoc `TimePeriod` parsing logic from ipt_establish.rs. Part of #1070
* | | | tor-keymgr: Remove unnecessary KeyDenotator impl.Gabriela Moldovan2023-11-021-10/+0
| | | |
* | | | tor-keymgr: Remove derive_meta arg from KeyMgr::list_matching (fmt).Gabriela Moldovan2023-11-022-25/+18
| | | |
* | | | tor-keymgr: Remove derive_meta arg from KeyMgr::list_matching.Gabriela Moldovan2023-11-022-21/+15
| | | | | | | | | | | | | | | | | | | | This addresses the TODO that resulted from this thread https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1677#note_2955700
* | | | replay: Remove false-positive special-casing in testsNick Mathewson2023-11-021-31/+10
| | | | | | | | | | | | | | | | | | | | | | | | (The actual false positive rate for these cases is very small, since the filters are very much not full. I haven't been able to hit one in hours of looping.)
* | | | Add a missing backtick.gabi-2502023-11-021-1/+1
| | | |
* | | | Use io::Result to shorten return type.gabi-2502023-11-021-1/+1
| | | |
* | | | Add a replay log to IptMsgHandler.Nick Mathewson2023-11-021-0/+35
| | | | | | | | | | | | | | | | | | | | Right now, this is always an ephemeral log, which isn't right: There are TODO comments here explaining what to do instead.
* | | | hss: Add functionality for a persistent replay log.Nick Mathewson2023-11-023-1/+427
| |/ / |/| | | | | | | | See comments for design notes.
* | | Merge branch 'hss-err-misc' into 'main'Ian Jackson2023-11-012-2/+22
|\ \ \ | |/ / |/| | | | | | | | HSS misc tweaks See merge request tpo/core/arti!1718
| * | HSS: impl HasKind for FatalErrorIan Jackson2023-11-011-0/+13
| | |
| * | HSS: publisher: Add ReactorError::Other containing FatalErrorIan Jackson2023-11-011-2/+9
| | |
* | | Merge branch 'warning' into 'main'gabi-2502023-11-011-2/+2
|\ \ \ | | | | | | | | | | | | | | | | tor-keymgr: Fix a broken docs link See merge request tpo/core/arti!1721