summaryrefslogtreecommitdiff
path: root/crates/tor-hsservice/src/svc.rs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'semver-breaking-upgrade-of-the-daleks' into 'main'Nick Mathewson2023-11-291-12/+7
|\ | | | | | | | | | | | | Convert to the latest versions of dalek-cryptography Closes #808 See merge request tpo/core/arti!1767
| * llcrypto: Hide the members of ExpandedKeypair.Nick Mathewson2023-11-291-2/+2
| | | | | | | | | | With this change, we no longer expose the ExpandedSecretKey unescorted, which makes it harder to misuse the API.
| * Remove RngCompatExt.Nick Mathewson2023-11-291-2/+1
| | | | | | | | | | | | | | | | | | | | This code was needed with the old version of dalek-cryptography, which wasn't compatible with up-to-date versions of the `rand` crate(s). But now that we've upgraded, we can drop this. (We could have left it around and deprecated it, but we are already making a breaking change to tor-llcrypto by upgrading dalek-cryptography.)
| * Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-291-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* | tor-hsservice: test_temp_dir: Rename to used_byIan Jackson2023-11-291-1/+1
| | | | | | | | | | | | from obtain_in. As per irc discussion.
* | tor-hsservice: test_temp_dir: Rename to TestTempDirGuardIan Jackson2023-11-291-2/+2
| | | | | | | | | | | | from UsingTempDir. As per irc discussion.
* | tor-hsservice tests: create_keymgr: add a doc commentIan Jackson2023-11-291-0/+1
| |
* | tor-hsservice tests: Make create_keymgr pub(crate)Ian Jackson2023-11-281-2/+2
| | | | | | | | We're going to want this for other tests in this crate.
* | tor-hsservice tests: Change create_keymgr to use TestTempDirIan Jackson2023-11-281-24/+26
|/
* Merge branch 'keymgr-derive-builder' into 'main'gabi-2502023-11-281-2/+7
|\ | | | | | | | | | | | | tor-keymgr: Derive Builder for KeyMgr. Closes #1114 See merge request tpo/core/arti!1760
| * tor-keymgr: Derive Builder for KeyMgr (fmt).Gabriela Moldovan2023-11-271-1/+6
| |
| * tor-keymgr: Derive Builder for KeyMgr.Gabriela Moldovan2023-11-271-2/+2
| | | | | | | | | | | | | | `KeyMgr` is soon going to have more fields, so now is a good time to derive `Builder` for it. Closes #1114
* | tor-hsservice: Remove a done TODOIan Jackson2023-11-271-2/+0
| | | | | | | | This is now in fact plumbed through.
* | tor-hsservice: ipt_set: Make initial state in the constructorIan Jackson2023-11-271-1/+1
|/ | | | | | | | This struct is going to be responsible for loading and storing some persistent state, so it makes sense for it to handle initialisation. This also reduces duplication.
* HSS errors: expose and sort out NetdirProviderShutdown error typeIan Jackson2023-11-201-1/+1
| | | | | | We're going have it in an variant in FatalError. Also make it impl HasKind and have IptError delegate to that.
* tor-hsservice: Define key specifiers using the new helper macro (fmt).Gabriela Moldovan2023-10-301-1/+1
|
* tor-hsservice: Define key specifiers using the new helper macro.Gabriela Moldovan2023-10-301-16/+18
| | | | Closes #1069
* tor-hsservice: Fix hsid being logged inappropriately.Gabriela Moldovan2023-10-191-1/+1
| | | | | | The condition for logging the "generated a new identity.." message was wrong (`generate_with_derive()` returns `Some(())` if it generated a new key, and `None` if the key was already present).
* tor-hsservice: Log newly generated HsIds.Gabriela Moldovan2023-10-191-2/+16
|
* HSS: Add many must_use annotationsIan Jackson2023-10-191-0/+1
|
* tor-hsservice: Give IptManager a KeyMgr.Gabriela Moldovan2023-10-191-0/+1
|
* tor-hsservice: Hoist the key metadata out of HsSvcKeyRole.Gabriela Moldovan2023-10-191-15/+15
| | | | | We will need the string rerpresentation (minus the TimePeriod or any other metadata) of `HsSvcKeyRole`s for building `KeyPathPattern`s.
* tor-hsservice: Narrow some dead code allowsIan Jackson2023-10-161-0/+1
|
* oneshot: Apply deferred rustfmt churnIan Jackson2023-10-111-1/+1
| | | | cargo fmt, precisely.
* oneshot: Use veneer in tor-hsserviceIan Jackson2023-10-111-1/+1
|
* 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-hsservice: Make OnionServices auto-generate the hs_id, if it's missing.Gabriela Moldovan2023-10-091-0/+72
|
* Note reconfigure limitations.Nick Mathewson2023-10-051-0/+4
|
* hss: Implement a reconfigure function.Nick Mathewson2023-10-051-3/+17
|
* Merge branch 'configure_onion_service' into 'main'Nick Mathewson2023-10-031-1/+6
|\ | | | | | | | | Initial work on top-level onion service configuration See merge request tpo/core/arti!1638
| * Add/clarify comments about name duplication.Nick Mathewson2023-10-031-0/+5
| |
| * hss: Rename the "name" config field to "nickname".Nick Mathewson2023-10-031-1/+1
| |
* | 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-031-7/+2
| | | | | | | | | | | | | | | | 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: Rename the real version of the publisher mockable state.Gabriela Moldovan2023-10-031-3/+2
| | | | | | | | | | 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-031-2/+3
|/ | | | provider).
* hss: helper to get a stream of StreamReq from a stream of RendReq.Nick Mathewson2023-09-271-0/+3
| | | | | | This isn't very much code, but given how long it took me to write this and make it typecheck, I suspect that others may find it useful as well.
* hss: actually provide a stream of RendRequest from launch().Nick Mathewson2023-09-271-12/+22
|
* tor-hsservice: Make Publisher::launch return a StartupError.Gabriela Moldovan2023-09-271-3/+1
| | | | | | This simplifies error handling in `OnionService`. Closes #1052
* tor-hsservice: Make Launchable a non-async trait.Gabriela Moldovan2023-09-271-7/+4
| | | | | This doesn't need to be an async_trait now that `Publisher::launch` is no longer async.
* tor-hsservice: Make Publisher::launch non-async.Gabriela Moldovan2023-09-271-1/+0
| | | | | | Fixes #1052 See also the discussion in !1616
* hss: Make launch() non-consuming.Nick Mathewson2023-09-261-1/+1
| | | | | We want to still have the OnionService kicking around, so we can use it as a handle.
* tor-hsservice: Make keys.rs a top-level module.Gabriela Moldovan2023-09-221-1/+0
|
* tor-hsservice: Add key specifier for blinded_id keypairs.Gabriela Moldovan2023-09-221-0/+1
|
* tor-hsservice: Give the publisher a reference to the key manager.Gabriela Moldovan2023-09-221-0/+1
|
* hss: Un-parameterize OnionService.Nick Mathewson2023-09-211-20/+31
|
* hss: remove an "#[allow(...)]".Nick Mathewson2023-09-211-2/+0
|
* hss: adjust members of OnionService type.Nick Mathewson2023-09-211-21/+11
|
* hss: fix error return from OnionService::launch()Nick Mathewson2023-09-211-1/+5
|