| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
Because of the sorting requirement and the fact that a `KeyMgr` can have
multiple Ntor keys, the caller now explicitly extract the two Ntor keys
it wants from the `KeyMgr` and then creates a `RelayNtorKeys` object
with them.
Future changes (#2495) will move this into a view and warn if there are
more than 2 keys.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
This is when we get them from the keystore so we can have a concept of
ordering in the SmallVec.
Future commit will transform this into a struct handling both keys.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
We only need the max, not the entire sorted list.
|
| |
|
|
| |
This is useful for testing.
|
| |
|
|
| |
Small cleanup.
|
| |
|
|
| |
Code movement only.
|
| |
|
|
| |
Set up function placeholder.
|
| |
|
|
| |
Usually, there will only be two of these.
|
| |
|
|
|
| |
This also updates the key rotation task to call the setter whenever the
ntor keys get updated.
|
| | |
|
| |
|
|
| |
This will need to be updated each time the ntor keys change.
|
| | |
|
| | |
|
| |
|
|
|
| |
I am about to add another one of these, so I tried to deduplicate the
impls a bit.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
The logic for removing and generating ntor keys is going to be slightly
different here.
|
| | |
|
| |
|
|
| |
This will enable us to plug in the ntor key rotation logic.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
| |
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()`).
|
| |\
| |
| |
| |
| |
| |
| | |
Allow compile-time selection of rustls CryptoProvider; use aws-lc-rs by default.
Closes #2448
See merge request tpo/core/arti!3857
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Add support for handling CREATE_FAST cells and launching a circuit reactor
See merge request tpo/core/arti!3846
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
The API for retrieving certs exists now, so we don't need to regenerate
the cert each time.
This addresses a TODO.
|
| | | |
| | |
| | |
| | | |
For readability.
|
| | | |
| | |
| | |
| | |
| | | |
We forgot to move this comment when we replaced the hard-coded durations
with top-level constants.
|
| | |/
|/| |
|
| | |
| |
| |
| |
| | |
The specifiers are local to the crate, so we don't need the
`valid_until` accessors anymore.
|
| | |
| |
| |
| | |
These no longer need to be `pub` now that they're in `arti-relay`.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
| |
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`
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| | |
|
| |
|
|
|
| |
I had intended for this to be 'info' in f287ec7910, but must have
accidentally wrote 'debug'.
|
| |
|
|
| |
Typos found with codespell
|
| |
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
|
|
| |
Tests the key rotation code.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
This way we can unit tests properly.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|