summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tor-hsservice: Add tests for maybe_generate_hsid.Gabriela Moldovan2023-10-091-0/+189
| | |
* | | tor-hsservice: Move hsid generation to a separate function.Gabriela Moldovan2023-10-091-59/+71
| | |
* | | tor-keymgr: Make generate_with_derived validate any existing key pairs.Gabriela Moldovan2023-10-091-4/+40
| | |
* | | tor-hsservice: Make OnionServices auto-generate the hs_id, if it's missing.Gabriela Moldovan2023-10-092-0/+89
| | |
* | | tor-keymgr: Add KeyMgr::generate_with_derived for generating keypairs.Gabriela Moldovan2023-10-091-6/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating a keypair, `KeyMgr::generate` inserts a single entry representing the keypair into the keystore. However, for some keypairs, the keystore will need contain a separate entry containing just the public part of the keypair. This commit introduces `KeyMgr::generate_with_derived`, which generates 2 entries in the specified keystore: one for the keypair and another for the public key, which makes it easier to insert keypairs and their corresponding public keys into the keystore without to fall out of sync. Previously, generating a (public, private) keypair involved generating a new keypair with `KeyMgr::generate` and manually inserting the corresponding public key entry.
* | | tor-keymgr: Factor the generate() function into a separate trait.Gabriela Moldovan2023-10-093-51/+52
| | | | | | | | | | | | | | | | | | `EncodableKey` is a trait for encoding keypairs and public keys. Keygen only makes sense for key_pairs_ (it doesn't make sense for public keys), so it makes sense to move `generate()` out of `EncodableKey`,
* | | Merge branch 'reconfig_onions' into 'main'gabi-2502023-10-094-4/+61
|\ \ \ | | | | | | | | | | | | | | | | Implement reconfigure functions for hsservice and hsrproxy See merge request tpo/core/arti!1651
| * | | Note reconfigure limitations.Nick Mathewson2023-10-052-0/+8
| | | |
| * | | hss: Implement a reconfigure function.Nick Mathewson2023-10-052-3/+43
| | | |
| * | | hsrproxy: Add "how" to reconfigure.Nick Mathewson2023-10-052-1/+10
| | | | | | | | | | | | | | | | Our reconfigure methods take these by convention.
* | | | Merge branch 'new-mock-time-3' into 'main'Nick Mathewson2023-10-052-5/+109
|\ \ \ \ | |/ / / |/| | | | | | | | | | | tor-rtmock: Docs updates (and an API fix) See merge request tpo/core/arti!1650
| * | | tor-rtmock: simple_time: Don't export StateIan Jackson2023-10-051-1/+1
| | | | | | | | | | | | | | | | This was a slip.
| * | | tor-rtmock: Provide a comprehensive exampleIan Jackson2023-10-051-1/+100
| | | |
| * | | tor-rtmock: Update the rubric for current recommendationsIan Jackson2023-10-051-3/+8
| | | |
* | | | Merge branch 'new-mock-time' into 'main'Nick Mathewson2023-10-0512-134/+592
|\| | | | | | | | | | | | | | | | | | | Provide and use a SimpleMockTimeProvider See merge request tpo/core/arti!1639
| * | | tor-rtmock: MockSleepProvider docs: Move example (fmt)Ian Jackson2023-10-051-12/+12
| | | | | | | | | | | | | | | | | | | | Adding "/// " to every line causes rustfmt to have conniptions about the trailing whitespace.
| * | | tor-rtmock: MockSleepProvider docs: Move exampleIan Jackson2023-10-052-73/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This example demonstrates MockSleepRuntime, which we don't want to use in new tests. It's probably worth keeping it, though, to help with comprehension of existing tests. So move it. This does rather highlight the lack of good overall example/instructions for MockRuntime.
| * | | tor-rtmock: simple_time: Rename `wakers` to `futures` (fmt)Ian Jackson2023-10-051-1/+4
| | | |
| * | | tor-rtmock: simple_time: Rename `wakers` to `futures`Ian Jackson2023-10-051-11/+11
| | | | | | | | | | | | | | | | This is clearer, I think.
| * | | tor-rtmock: simple_time: Rename `pq` to `unready`Ian Jackson2023-10-051-13/+13
| | | | | | | | | | | | | | | | This is clearer, I think.
| * | | tor-rtmock: simple_time: Expand on advance and task orderingIan Jackson2023-10-051-2/+8
| | | |
| * | | tor-rtmock: simple_time: Clarify/correct comments about invariantIan Jackson2023-10-051-2/+2
| | | |
| * | | tor-rtmock: Add deprecation warning to MockSleepRuntimeIan Jackson2023-10-051-1/+7
| | | |
| * | | tor-rtmock: MockSleepProvider docs: Move deprecation discussionIan Jackson2023-10-051-32/+38
| | | | | | | | | | | | | | | | | | | | The module-level docs here are less visible and also not where most of the other stuff was.
| * | | tor-rtmock: MockSleepProvider docs: Compare with SimpleMockTimeProviderIan Jackson2023-10-051-0/+22
| | | |
| * | | tor-rtmock: simple_time: Clarify some things in time_until_next_timeoutIan Jackson2023-10-051-0/+6
| | | |
| * | | tor-rtmock: simple_time: Give formal names to the statesIan Jackson2023-10-051-2/+21
| | | | | | | | | | | | | | | | And introduce a table showing the situations.
| * | | tor-rtmock: simple_time: take() the waker when we wakeIan Jackson2023-10-051-2/+5
| | | | | | | | | | | | | | | | | | | | We don't need it any more; we won't call wake again. So, call .wake() rather than .wake_by_ref().
| * | | tor-rtmock: Provide SimpleTimeProvider: clarify .sleep() innardsIan Jackson2023-10-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Making the SleepFuture first means we don't call .wake_any() with the other invariants violated. This doesn't actually matter with the code as it stands, but it's less confusing this way.
| * | | tor-rtmock: MockRuntime: in advance_*, warn to stderr about loopingIan Jackson2023-10-031-1/+21
| | | | | | | | | | | | | | | | | | | | This helped me diagnose https://gitlab.torproject.org/tpo/core/arti/-/issues/1040
| * | | tor-rtmock: Break out advance_innerIan Jackson2023-10-031-10/+31
| | | | | | | | | | | | | | | | We're going to want to add something to it.
| * | | tor-rtmock: Add a deprecation warning to MockSleepProviderIan Jackson2023-10-032-0/+14
| | | |
| * | | tor-rtmock: Abolish deprecated Runtime::advance()Ian Jackson2023-10-033-19/+2
| | | | | | | | | | | | | | | | | | | | Now we're making breaking changes anyway, in or mock crate, it is a convenient time to get rid of this.
| * | | tor-rtmock: Fix doc refs to advance_*Ian Jackson2023-10-031-2/+2
| | | |
| * | | tor-rtmock: Rename MockRuntime::jump_to to jump_wallclockIan Jackson2023-10-033-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | This was named after the method from MockSleepRuntime. The name is confusing because it seems to imply it might do something to the monotonic time.
| * | | tor-rtmock: Abolish just-introduced confusing type alias (fmt)Ian Jackson2023-10-031-1/+1
| | | |
| * | | tor-rtmock: Abolish just-introduced confusing type aliasIan Jackson2023-10-031-8/+8
| | | |
| * | | tor-rtmock: Switch MockRuntime to SimpleMockSleepProviderIan Jackson2023-10-035-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now we do this by changing the meaning of the name `MockSleepProvider` in runtime.rs. This is a bodge to reduce noise in this diff. Consequences at call sites: * If the type is named somehow, the other type must be used. * SimpleMockTimeProvider calls it jump_wallclock rather than jump_to, which is IMO a better name. (MockRuntime will change in a moment.) * SimpleMockTimeProvider's advance() function isn't async and doesn't yield. But none of the call sites actually mind that.
| * | | tor-rtmock: Provide SimpleTimeProviderIan Jackson2023-10-034-0/+350
| | | |
| * | | tor-rtmock: Add priority-queue dependencyIan Jackson2023-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For our time provider we want a priority queue that lets us look up entries and delete them. std's Heap doesn't do that. priority-queue has the API we need and reasonable stats etc, and is maintained. It has some IMO-tolerable licence wrinkles.
| * | | tor-rtmock: Drop some obsolete caveatsIan Jackson2023-10-031-7/+2
| | | | | | | | | | | | | | | | Nowadays there are methods for this.
* | | | Merge branch 'launch_onion_proxies' into 'main'Nick Mathewson2023-10-055-7/+102
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | arti: Write the minimal code needed to launch onion proxies. See merge request tpo/core/arti!1644
| * | | | arti: Lower some over-broad #allows in onion_proxy.rsNick Mathewson2023-10-051-4/+2
| | | | |
| * | | | arti: Actually launch the onion service code.Nick Mathewson2023-10-051-0/+9
| | | | |
| * | | | arti: functions to configure and launch actual onion service proxies.Nick Mathewson2023-10-051-3/+82
| | | | |
| * | | | hss: Mark RendCircConnector as Send+SyncNick Mathewson2023-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | This makes some other futures Send+Sync, which lets us spawn them.
| * | | | hss: Give Config a nickname accessor.Nick Mathewson2023-10-041-0/+7
| | | | |
| * | | | hsrproxy: add a note about a future warning.Nick Mathewson2023-10-041-0/+2
| | | | |
* | | | | Merge branch 'clarify2' into 'main'gabi-2502023-10-041-3/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | tor-hsservice: ipt_set: Docs clarifications See merge request tpo/core/arti!1647
| * | | | | tor-hsservice: ipt_set: Docs clarificationsIan Jackson2023-10-041-3/+9
| |/ / / / | | | | | | | | | | | | | | | Apropos a conversation in !1645