| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
The crypto task can now signal the descriptor task that the keys have
changed related to the relay descriptor (signing key and ntor keys) so
a new descriptor can be built and uploaded.
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
Now it can be used with `KeyMgr` and `&KeyMgr`, not only `Arc<KeyMgr>`.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.
I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.
This commit makes cargo clippy fail. We will add exceptions in the next
commit.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The recompute of the valid_until cache is done now in the constructor of
FullKeyView so the view is directly usable once built.
Else, the caller always need to call the recompute function which is
error prone especially when used as a throwaway view.
Also, without this change, building the view and then attempting to log
the public keys would fail.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Move all key related action function to keys.rs in order to alleviate
crypto.rs.
The Reactor will get more functionnalities soon so cleanup.
No behavior change, just code movement.
Related to #2548
|
| |
|
|
|
|
| |
Now, the FullKeyView is officially only seen by the crypto task.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No need for the valid_until cache locking that used to ensure coherent
view accross tasks.
As we move towards having the FullKeyView be solely owned by the crypto
task, no need for locking.
Future commit will introduce a control command channel which will be
used to get keys for other tasks.
The valid_until cache is kept though because it helps with key lookups
to avoid walking all keys each time.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Instead of a HashMap, use a struct that contains explicit valid_until
value per key type as those won't change anytime soon.
This is to have a smaller memory footprint and simpler design.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
| |
This change made it that we don't need Result<> to be returned for two
functions therefore affecting the callsites.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This is the last piece that needed to be removed since we can use the
view to get those keys.
This also allows us to remove the temporary FullKeyView::keymgr()
function and instead keep the keymgr access strictly to the view guard.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is so we early set the FullKeyView and we use it accross the code
from initialization.
The try_generate_keys() now takes a view and locks it to make its
changes.
And we also make build_proto_relay_auth_material() use a view to
simplify its code and also stop relying on the KeyMgr for key accessors.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Rebuild the valid_until cache from the key manager and return which key
has changed.
Function is not used in this commit.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
This basically copies the code from rotate_keys_task() and puts it in
the run_once().
Cleanup will follow in the next commits to lock step changes.
Signed-off-by: David Goulet <[email protected]>
|
|
|
This object wraps the `KeyMgr` and provide getters for all specific
relay key types.
That view is meant to access all keys a relay has. Upcoming restricted
views will wrap that object to offer a limited view that is more domain
specific.
A valid_until cache is kept for all expirable keys so all get() of those
keys always return the same one.
Signed-off-by: David Goulet <[email protected]>
|