aboutsummaryrefslogtreecommitdiff
path: root/crates/arti-relay/src
Commit message (Collapse)AuthorAgeFilesLines
...
* arti-relay: Fix test MockRuntime::advance_by() usageGabriela Moldovan2026-04-091-6/+2
| | | | | | | This was previously advancing time by more than intended (I think the intention here was to use something like `MockRuntime::jump_wallclock()`, but that function has no effect on sleeping futures, so I think we should continue using `advance_by()`).
* Merge branch 'rustls-defaults' into 'main'Nick Mathewson2026-04-081-2/+3
|\ | | | | | | | | | | | | Allow compile-time selection of rustls CryptoProvider; use aws-lc-rs by default. Closes #2448 See merge request tpo/core/arti!3857
| * arti-relay: Change CryptoProvider to aws-lc-rs.Nick Mathewson2026-04-081-2/+3
| |
* | Merge branch 'create-fast' into 'main'opara2026-04-084-2/+201
|\ \ | | | | | | | | | | | | Add support for handling CREATE_FAST cells and launching a circuit reactor See merge request tpo/core/arti!3846
| * | arti-relay: add support for a `CreateRequestHandler`Steven Engler2026-04-084-2/+201
| | |
* | | arti-relay: Retrieve the signing key cert from the keystoreGabriela Moldovan2026-04-081-8/+16
| | | | | | | | | | | | | | | | | | | | | The API for retrieving certs exists now, so we don't need to regenerate the cert each time. This addresses a TODO.
* | | arti-relay: Reuse cert_expiry calculationGabriela Moldovan2026-04-081-2/+3
| | | | | | | | | | | | For readability.
* | | arti-relay: Move comment closer to the durations it refers toGabriela Moldovan2026-04-081-2/+2
| | | | | | | | | | | | | | | We forgot to move this comment when we replaced the hard-coded durations with top-level constants.
* | | arti-relay: Use more descriptive names for the key lifetimesGabriela Moldovan2026-04-081-20/+20
| |/ |/|
* | arti-relay: Remove no-longer needed implsGabriela Moldovan2026-04-012-26/+5
| | | | | | | | | | The specifiers are local to the crate, so we don't need the `valid_until` accessors anymore.
* | arti-relay: Make the key specifiers pub(crate)Gabriela Moldovan2026-04-011-14/+14
| | | | | | | | These no longer need to be `pub` now that they're in `arti-relay`.
* | arti-relay: Move all key specifiers to a new keys module (fmt)Gabriela Moldovan2026-04-012-17/+13
| |
* | arti-relay: Move all key specifiers to a new keys moduleGabriela Moldovan2026-04-013-12/+332
|/ | | | | | | | | | | This extracts the key specifier types out of `tor-relay-crypto`, which * makes the code layout consistent with the hidden service crates (the key specifiers are defined in a `keys` module in `tor-hsservice`, while the key wrapper types live in `tor-hscrypto::pk`) * helps reduce the API surface: the key specifiers are only used in `arti-relay`, so we can move them there and make them `pub(crate)` instead of `pub`
* proto: Rename RelayIdentities to RelayChannelAuthMaterialDavid Goulet2026-03-302-19/+22
| | | | | | | | | | | | This object contains a melting pot of public keys, private keys and certificates. Rename it to reflect that it is channel authentication material and not "identities. https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3791#note_3374454 Signed-off-by: David Goulet <[email protected]>
* 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]>