summaryrefslogtreecommitdiff
path: root/crates/arti-relay
Commit message (Collapse)AuthorAgeFilesLines
...
* arti-relay: Use unquoted type in keypair_specifier attrGabriela Moldovan2026-04-161-2/+2
|
* arti-relay: improve ntor key loggingSteven Engler2026-04-141-5/+8
| | | | We only need the max, not the entire sorted list.
* arti-relay: log the public ntor keySteven Engler2026-04-142-3/+33
| | | | This is useful for testing.
* arti-relay: move key logging (part 3)Steven Engler2026-04-131-3/+0
| | | | Small cleanup.
* arti-relay: move key logging (part 2)Steven Engler2026-04-131-21/+21
| | | | Code movement only.
* arti-relay: move key logging (part 1)Steven Engler2026-04-131-0/+11
| | | | Set up function placeholder.
* arti-relay: Use a SmallVec for the ntor keysGabriela Moldovan2026-04-092-2/+5
| | | | Usually, there will only be two of these.
* proto: Add method for installing ntor keys in the create handlerGabriela Moldovan2026-04-091-1/+1
| | | | | This also updates the key rotation task to call the setter whenever the ntor keys get updated.
* arti-relays: Pass a CreateRequestHandler to the crypto task (fmt)Gabriela Moldovan2026-04-091-3/+8
|
* arti-relays: Pass a CreateRequestHandler to the crypto taskGabriela Moldovan2026-04-092-1/+4
| | | | This will need to be updated each time the ntor keys change.
* arti-relay: Add tests for the ntor key rotationGabriela Moldovan2026-04-091-0/+53
|
* arti-relay: Test that 1 ntor key gets generated on first runGabriela Moldovan2026-04-091-0/+7
|
* arti-relay: Dedupe test helperGabriela Moldovan2026-04-091-16/+10
| | | | | I am about to add another one of these, so I tried to deduplicate the impls a bit.
* arti-relays: Extend existing tests to check ntor key rotation (fmt)Gabriela Moldovan2026-04-091-1/+4
|
* arti-relays: Extend existing tests to check ntor key rotationGabriela Moldovan2026-04-091-2/+6
|
* arti-relay: Generate and rotate ntor keysGabriela Moldovan2026-04-091-10/+162
| | | | | | | | There is still some outstanding work here to read the lifetime and grace period from the consensus, but that will require some bigger changes to the rotation task. Closes #2451
* arti-relay: Add callbacks for deciding whether to expire and generateGabriela Moldovan2026-04-091-11/+26
| | | | | The logic for removing and generating ntor keys is going to be slightly different here.
* arti-relay: Replace have_rotated bools with KeyChange (fmt)Gabriela Moldovan2026-04-091-8/+14
|
* arti-relay: Replace have_rotated bools with KeyChangeGabriela Moldovan2026-04-091-15/+23
| | | | This will enable us to plug in the ntor key rotation logic.
* arti-relay: Add a struct describing a key change eventGabriela Moldovan2026-04-091-0/+19
| | | | | | This is just a wrapper over `bool` right now. It will helps us distinguish changes to the channel auth material from changes affecting the ntor circuit extension keys.
* arti-relay: s/have_rotated/have_removed for clarityGabriela Moldovan2026-04-091-2/+2
|
* relay: Pass advertise SocketAddr to channel builder instead of IpAddrDavid Goulet2026-04-092-6/+6
| | | | | | | | | | This trickles down to the tor-proto channel handshake code. But, the real need is in the channel builder in order to validate the outbound channel target. Fixes #2440 Signed-off-by: David Goulet <[email protected]>
* 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-082-3/+4
|\ | | | | | | | | | | | | 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-082-3/+4
| |
* | Merge branch 'create-fast' into 'main'opara2026-04-085-3/+203
|\ \ | | | | | | | | | | | | 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-085-2/+202
| | |
| * | arti-relay: use 'tor-proto/flowctl-cc' featureSteven Engler2026-04-081-1/+1
| | |
* | | 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
| | |
* | | Update to derive-deftly 0.11.0 to pick up `meta_quoted rigorous`Ian Jackson2026-04-021-1/+1
| |/ |/|
* | 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-014-13/+334
|/ | | | | | | | | | | 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`
* Merge branch 'fixes_mr3791' into 'main'David Goulet2026-03-312-19/+22
|\ | | | | | | | | Address post-merge comments from nickm's review in mr 3791 See merge request tpo/core/arti!3802
| * 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]>
* | Update to derive-deftly 0.10.0.Ian Jackson2026-03-311-1/+1
| | | | | | | | There are no breaking changes.
* | Bump versions: tor-* and arti-* unstable cratesIan Jackson2026-03-301-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with nailing-cargo -Eu set-version -p arti-client 0.41.0 nailing-cargo -Eu set-version -p arti-relay 0.41.0 nailing-cargo -Eu set-version -p arti-rpcserver 0.41.0 nailing-cargo -Eu set-version -p arti-ureq 0.41.0 nailing-cargo -Eu set-version -p arti-rpc-client-core 0.41.0 nailing-cargo -Eu set-version -p tor-basic-utils 0.41.0 nailing-cargo -Eu set-version -p tor-error 0.41.0 nailing-cargo -Eu set-version -p tor-general-addr 0.41.0 nailing-cargo -Eu set-version -p tor-geoip 0.41.0 nailing-cargo -Eu set-version -p tor-memquota-cost 0.41.0 nailing-cargo -Eu set-version -p tor-llcrypto 0.41.0 nailing-cargo -Eu set-version -p tor-cert-x509 0.41.0 nailing-cargo -Eu set-version -p tor-rtcompat 0.41.0 nailing-cargo -Eu set-version -p tor-rtmock 0.41.0 nailing-cargo -Eu set-version -p tor-async-utils 0.41.0 nailing-cargo -Eu set-version -p tor-config 0.41.0 nailing-cargo -Eu set-version -p tor-config-path 0.41.0 nailing-cargo -Eu set-version -p tor-rpc-connect 0.41.0 nailing-cargo -Eu set-version -p tor-log-ratelim 0.41.0 nailing-cargo -Eu set-version -p tor-rpcbase 0.41.0 nailing-cargo -Eu set-version -p tor-memquota 0.41.0 nailing-cargo -Eu set-version -p tor-units 0.41.0 nailing-cargo -Eu set-version -p tor-bytes 0.41.0 nailing-cargo -Eu set-version -p tor-protover 0.41.0 nailing-cargo -Eu set-version -p tor-checkable 0.41.0 nailing-cargo -Eu set-version -p tor-cert 0.41.0 nailing-cargo -Eu set-version -p tor-key-forge 0.41.0 nailing-cargo -Eu set-version -p tor-hscrypto 0.41.0 nailing-cargo -Eu set-version -p tor-socksproto 0.41.0 nailing-cargo -Eu set-version -p tor-linkspec 0.41.0 nailing-cargo -Eu set-version -p tor-cell 0.41.0 nailing-cargo -Eu set-version -p tor-persist 0.41.0 nailing-cargo -Eu set-version -p tor-keymgr 0.41.0 nailing-cargo -Eu set-version -p tor-relay-crypto 0.41.0 nailing-cargo -Eu set-version -p tor-proto 0.41.0 nailing-cargo -Eu set-version -p tor-netdoc 0.41.0 nailing-cargo -Eu set-version -p tor-consdiff 0.41.0 nailing-cargo -Eu set-version -p tor-netdir 0.41.0 nailing-cargo -Eu set-version -p tor-relay-selection 0.41.0 nailing-cargo -Eu set-version -p tor-chanmgr 0.41.0 nailing-cargo -Eu set-version -p tor-ptmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dircommon 0.41.0 nailing-cargo -Eu set-version -p tor-guardmgr 0.41.0 nailing-cargo -Eu set-version -p tor-circmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirclient 0.41.0 nailing-cargo -Eu set-version -p tor-dirmgr 0.41.0 nailing-cargo -Eu set-version -p tor-dirserver 0.41.0 nailing-cargo -Eu set-version -p tor-hsclient 0.41.0 nailing-cargo -Eu set-version -p tor-hsservice 0.41.0 nailing-cargo -Eu set-version -p tor-hsrproxy 0.41.0
* | Bump versions: patchlevel, with dependenciesIan Jackson2026-03-301-1/+1
|/ | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/issues/2436#note_3384773 Made with cargo set-version --offline --bump patch -p safelog
* 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-172-1/+244
| | | | | | 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]>