summaryrefslogtreecommitdiff
path: root/crates/arti-relay/src
Commit message (Collapse)AuthorAgeFilesLines
* arti-relay: add `log_sensitive_information` config optionSteven Engler2026-03-242-0/+32
|
* arti-relay: change a 'debug' log to 'info'Steven Engler2026-03-241-2/+2
| | | | | I had intended for this to be 'info' in f287ec7910, but must have accidentally wrote 'debug'.
* Fix typosTobias Stoeckmann2026-03-242-2/+2
| | | | Typos found with codespell
* relay: Pass now() instead of the runtime in the crypto taskDavid Goulet2026-03-171-37/+31
| | | | | | | | | This way we get the whole task job to be aligned on one single now value to avoid potential inconsistencies between expiry and key generation. Fixes #2404 Signed-off-by: David Goulet <[email protected]>
* relay: Add crypto tasks unit testDavid Goulet2026-03-171-1/+242
| | | | | | Tests the key rotation code. Signed-off-by: David Goulet <[email protected]>
* relay: Use same wallclock() time when generating keysDavid Goulet2026-03-171-8/+6
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Make the crypto tasks use the runtime wallclockDavid Goulet2026-03-172-25/+42
| | | | | | This way we can unit tests properly. Signed-off-by: David Goulet <[email protected]>
* relay: Rewrite the rotation key logic in the crypto taskDavid Goulet2026-03-171-163/+245
| | | | | | | | | | | | | | | | | | | | | | This is almost a full rewrite of the crypto task which was needed in order to support our relay signing certificate to be put in the keystore which will be needed for the offline key feature. Instead of having rotate_key() do all the things, we now instead do two pass: 1. Remove all expired keys and certs. 2. Generate any missing keys. This still results in using the minimum valid_until of all our keys for the task sleep time. We can know cleanup the local trait used for this gymnastic and trade it for some more KeyMgr gymnastic. Fixes #2404 Signed-off-by: David Goulet <[email protected]>
* relay: Don't log warn if key already exists when generating oneDavid Goulet2026-03-171-4/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Remove leftover comment from previous code iterationDavid Goulet2026-03-171-4/+0
| | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'typos' into 'main'opara2026-03-162-3/+3
|\ | | | | | | | | Fix various typos See merge request tpo/core/arti!3781
| * Fix grammar typosTobias Stoeckmann2026-03-152-2/+2
| |
| * Fix word duplicate typosTobias Stoeckmann2026-03-151-1/+1
| |
* | Fix windows cargo warningsTobias Stoeckmann2026-03-151-1/+3
|/ | | | Disable use-statements which are only needed for unix.
* arti-relay: Log relay identitiesSteven Engler2026-03-122-0/+33
|
* tor-basic-utils: move `iter_join` from arti-relaySteven Engler2026-03-033-33/+4
| | | | Will clean this up in the following commit.
* arti-relay: use `debug_report` for failed channelsSteven Engler2026-02-261-1/+8
|
* proto: The AUTHENTICATE cell requires the SHA256 RSA identity digestDavid Goulet2026-02-261-1/+1
| | | | | | | Before this commit, we would use the RsaIdentity which is a SHA1 digest. We do the same for the peer RSA key. Signed-off-by: David Goulet <[email protected]>
* relay: Sleep rotate key task with earliest valid_untilDavid Goulet2026-02-251-19/+54
| | | | Signed-off-by: David Goulet <[email protected]>
* chanmgr: Responder relay channel now use the builder my_addrsDavid Goulet2026-02-242-21/+4
| | | | | | No need to pass from the arti relay binary our addresses when handling an incoming channel, use the one in the channel builder that an initiator channel uses.
* relay: Set ChanMgr with our addressesDavid Goulet2026-02-241-2/+3
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Update ChanMgr on key rotationDavid Goulet2026-02-242-9/+20
| | | | Signed-off-by: David Goulet <[email protected]>
* Merge branch 'err-msgs' into 'main'David Goulet2026-02-242-8/+15
|\ | | | | | | | | arti-relay: Improve error/warning messages See merge request tpo/core/arti!3711
| * arti-relay: fix stale commentSteven Engler2026-02-231-1/+1
| | | | | | | | This method was renamed previously.
| * arti-relay: add more error contextSteven Engler2026-02-231-6/+12
| |
| * arti-relay: don't warn if key gen was successfulSteven Engler2026-02-231-1/+2
| |
* | tor-relay: convert to derive_deftly(TorConfig)Nick Mathewson2026-02-241-55/+43
|/
* relay: Setup const for hardcoded value in crypto taskDavid Goulet2026-02-231-8/+13
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Log when key generation yields an existing key errorDavid Goulet2026-02-231-1/+4
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Simplify the crypto rotation task rotate_key()David Goulet2026-02-231-17/+11
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Get rid of start_task() for readabilityDavid Goulet2026-02-232-22/+10
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Generate relay identities at initDavid Goulet2026-02-232-7/+17
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Implement a helper to build RelayIdentitiesDavid Goulet2026-02-231-6/+107
| | | | | | | This required to add a slight helper to our tor-key-forge RSA key d-d macro to access the inner keypair. This avoids a clone. Signed-off-by: David Goulet <[email protected]>
* relay: Remove unused ephemeral keystoreDavid Goulet2026-02-231-5/+1
| | | | Signed-off-by: David Goulet <[email protected]>
* relay: Move try_generate_keys() into crypto taskDavid Goulet2026-02-232-39/+29
| | | | | | | Move rotating keys into a function so we can use it in try_generate_keys() that is used at startup. Signed-off-by: David Goulet <[email protected]>
* relay: Add a crypto task for key rotationDavid Goulet2026-02-233-1/+183
| | | | | | | | | | | | | This task crypto module has a rotate key task that is in charge of rotating keys from our KeyMgr based on the valid until. To do so, we add a RotatableKeySpec trait to help us specify our to rotate a specific key. Allows us to have a generic rotate/generate function for all our keys. Task runs every 60 seconds. Taken from C-tor. Signed-off-by: David Goulet <[email protected]>
* Allow clippy::collapsible_if to triggerGabriela Moldovan2026-02-161-0/+1
| | | | | | | | | `clippy::collapsible_if` started triggering after bumping the MSRV to 1.88. Since this triggers from a lot of places, and since there even are a couple of instances where we explicitly allow `clippy::collapsible_ifs`, I've opened #2342 for deciding what to do about it.
* relay: Add a TLS acceptor in the ChanBuilderDavid Goulet2026-02-091-7/+10
| | | | | | | | | | | | | | | This requires the `TlsKeyAndCert` so be passed on the TLS acceptor settings. We assume that `RelayIdentities` has this information. The ChanBuilder::new() was getting a bit too convoluted and feature gated to instead we introduce new_client() and new_relay() and remove the need for `with_identities()`. Because of this, the ChanMgr::new() now returns a `Result<>`. Related to #1597 Signed-off-by: David Goulet <[email protected]>
* arti-relay: launch the client's background tasksSteven Engler2026-02-032-9/+41
|
* arti-relay: rename 'bootstrap()' method to 'init()'Steven Engler2026-02-032-7/+8
| | | | This method won't really be used for bootstrapping anymore.
* arti-relay: remove old TODOSteven Engler2026-02-031-10/+0
| | | | See https://gitlab.torproject.org/tpo/core/arti/-/issues/2329
* arti-relay: move code into a "client" objectSteven Engler2026-02-033-64/+129
|
* arti-relay: Allow clippy_unused_asyncGabriela Moldovan2026-01-271-0/+1
| | | | The code here is still WIP, no need to apply the lint yet.
* maint/add_warning: Run script to add new warningGabriela Moldovan2026-01-271-0/+1
| | | | This adds the lint to all our crates.
* Merge branch 'ticket1599_03' into 'main'David Goulet2026-01-224-7/+33
|\ | | | | | | | | proto: Implement relay responder handshake and finalize it for both handshakes See merge request tpo/core/arti!3596
| * relay: Pass advertised addresses to the channel handlerDavid Goulet2026-01-224-7/+33
| | | | | | | | | | | | | | | | | | | | | | We need the advertised addresses for the NETINFO cell when opening a relay channel. Keep them in the TorRelay object so we can pass them to the ChanMgr channel handler. This will also help with config reload where only the local values in TorRelay will need to be updated. Signed-off-by: David Goulet <[email protected]>
* | arti-relay: change debug message to rate-limited warningSteven Engler2026-01-201-9/+19
|/
* arti-relay: call `tor_log_ratelim::install_runtime`Steven Engler2026-01-141-0/+4
|
* chanmgr: Introduce a ChanMgrConfig structDavid Goulet2026-01-131-2/+2
| | | | | | | | | | | | This struct is used to pass configuration parameters to the ChanMgr when building it. At the moment, it holds the ChannelConfig and RelayIdentities (feature gated) which will be used in subsequent commits. Note that relays do require RelayIdentities to build channels. Signed-off-by: David Goulet <[email protected]>
* chanmgr: Remove KeyMgr from constructorDavid Goulet2026-01-131-1/+0
| | | | | | | We'll rely on a RelayIdentities to pass in the right keys to the ChanMgr instead of the entire KeyMgr. Signed-off-by: David Goulet <[email protected]>