| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Done using:
```
for crate in $(./maint/list-crates | rg '^(tor|arti-)'); do
cargo set-version -p $crate 0.43.0
done
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The non-{arti-,tor-} crates are:
```
./maint/list-crates | rg -v '^(tor|arti)'
oneshot-fused-workaround
web-time-compat
slotmap-careful
test-temp-dir
fslock-guard
hashx
equix
caret
fs-mistrust
safelog
retry-error
futures-copy
```
We split them in the following categories:
* crates with no changes (no version bumps):
```
oneshot-fused-workaround: No change.
web-time-compat: No change.
slotmap-careful: No change.
test-temp-dir: No change.
caret: No change.
safelog: No change.
retry-error: No change.
futures-copy: No change.
```
Obtained with:
```
maint/changed-crates -v "arti-v$LAST_VERSION" 2>&1 >/dev/null | grep -i "no change" | grep -v '\(tor\|arti\)-'
```
* crates that only have non-functional changes (bump the patch version,
but not the dependend-on version):
- equix
* crates where functional changes were made, but no APIs were broken
(bump patch):
- fs-mistrust
* crates where APIs were broken (bump minor):
- hashx
- fslock-guard
The bumps from this commit were created using this script:
```
PATCH_NF=(
equix
)
PATCH="
fs-mistrust
"
MINOR="
hashx
fslock-guard
"
./maint/bump-nodep "${PATCH_NF[@]}"
for crate in $PATCH; do
cargo set-version --bump patch -p $crate;
done
for crate in $MINOR; do
cargo set-version --bump minor -p $crate;
done
```
|
| |
|
|
|
|
|
|
|
| |
`maint/fixup-features` was complaining that `metrics` was reachable from
`full` and also `__is_experimental`.
I'm making `metrics` a non-experimental feature, because the whole of
`arti-relay` is experimental (so there is really no need mark any of its
individual features as experimental right now).
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Remove the _no_lock() since no more locks now.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
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]>
|
| |
|
|
|
|
|
|
|
|
| |
Rename it to init_keys() so it capture the semantic of initialization
especially that now it returns a InitKeyMaterial.
This is so we don't use this function outside initialization in the
future.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves commit makes it that FullKewView is not visible outside the
crypto task.
For this, we need to keep the KeyMgr in the inert tor relay struct until
it is passed to the crypto task.
The public keys logging is moved to the run() function of the crypto
task and the try_generate_keys() now returns an InitKeyMaterial struct
which contains the channel authentication key material (for ChanMgr) and
the Ntor keys for the CREATE2 handler.
This way, we cut the need of the FullKeyView in the main thread.
Related to #2548
Signed-off-by: David Goulet <[email protected]>
|
| | |
|
| |
|
|
| |
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]>
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
| |
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]>
|
| |
|
|
|
|
|
| |
This effectively removes KeyChange and use the returned set of key types
that were rotated.
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]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Rename the try_rotate_keys() to be explicit about no locking and use it
in the Reactor.
We need this try_rotate_keys() independent function so our first
generate all keys can call it which is done before the reactor starts.
Because we need crypto material in order to initialize the ChanMgr, we
have to generate keys before spawning the task.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
This also remove unused code from this change.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
Like previous commit, we only care now if a generate has been done. It
is enough of a signal to rebuild our channel auth material and set ntor
keys.
Part of the refactoring into phases.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The crypto task remove_expired_keys() only returns the next minimum
expiry time of all keys it looked at if any remains.
This is part of a broad refactoring of the task so we get to have three
phases at each run that is: 1. Expire, 2. Rotate, 3. Reconcille
With that design, we only need to know if a rotation happened and if so,
we can signal other task that we did and rebuild the channel auth key
material and ntor keys.
The reconcille phase will be in charge of rebuilding the valid_until
task of the view.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
The race will appear once we start using the FullKeyView accross the
code in the next commit(s).
This is also neat because it will enforce that the keymgr is only
accessed with the write lock held.
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
This is a full copy without change (except the keymgr access) so that
function becomes a Reactor function.
Future commit will cleanup the original copy when the crypto reactor
replaces the current task.
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]>
|
| |
|
|
| |
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]>
|
| |
|
|
|
| |
This is not likely to cause any major problem, so just warning should be
fine.
|
| |
|
|
|
|
|
|
|
| |
This currently does not actually export any metrics, but puts the
infrastructure in place to do so.
This adds the `experimental`, `__is_experimental`, etc features to
arti-relay. I presume we want to do that in the long term, but I'm not
100% sure on that.
|
| |\
| |
| |
| |
| |
| |
| | |
Set socket buffer sizes (`SO_SNDBUF` and `SO_RCVBUF`) for proxy sockets
Closes #2500
See merge request tpo/core/arti!3957
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds the trait type `ListenOptions` to `NetStreamProvider` and adds
this `ListenOptions` as an argument to `NetStreamProvider::listen()`.
You probably want to look at the changes in tor-rtcompat first, then the
rest of this commit is updating the various places we use
`NetStreamProvider`.
|
| |/
|
|
|
|
|
|
|
|
|
| |
When the circ-padding feature is enabled, we use maybenot, which does
not yet support rand 0.10. In the meantime, enabling this feature pulls
in rand 0.9. This is not ideal, but should be okay as a temporary
situation.
This also replaces the use of ReseedingRng (which was removed in 0.10)
with the reseeding_rng crate. This is somewhat less performant, but it
should be okay.
|
| |\
| |
| |
| |
| | |
release: Version bumps
See merge request tpo/core/arti!3952
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
cargo set-version -p arti-client 0.42.0
cargo set-version -p arti-config 0.42.0
cargo set-version -p arti-relay 0.42.0
cargo set-version -p arti-rpc-client-core 0.42.0
cargo set-version -p arti-rpcserver 0.42.0
cargo set-version -p arti-testing 0.42.0
cargo set-version -p arti-ureq 0.42.0
cargo set-version -p tor-async-utils 0.42.0
cargo set-version -p tor-basic-utils 0.42.0
cargo set-version -p tor-bytes 0.42.0
cargo set-version -p tor-cell 0.42.0
cargo set-version -p tor-cert 0.42.0
cargo set-version -p tor-cert-x509 0.42.0
cargo set-version -p tor-chanmgr 0.42.0
cargo set-version -p tor-checkable 0.42.0
cargo set-version -p tor-circmgr 0.42.0
cargo set-version -p tor-config 0.42.0
cargo set-version -p tor-config-path 0.42.0
cargo set-version -p tor-consdiff 0.42.0
cargo set-version -p tor-dirclient 0.42.0
cargo set-version -p tor-dircommon 0.42.0
cargo set-version -p tor-dirmgr 0.42.0
cargo set-version -p tor-dirserver 0.42.0
cargo set-version -p tor-error 0.42.0
cargo set-version -p tor-events 0.42.0
cargo set-version -p tor-general-addr 0.42.0
cargo set-version -p tor-geoip 0.42.0
cargo set-version -p tor-guardmgr 0.42.0
cargo set-version -p tor-hsclient 0.42.0
cargo set-version -p tor-hscrypto 0.42.0
cargo set-version -p tor-hsrproxy 0.42.0
cargo set-version -p tor-hsservice 0.42.0
cargo set-version -p tor-key-forge 0.42.0
cargo set-version -p tor-keymgr 0.42.0
cargo set-version -p tor-linkspec 0.42.0
cargo set-version -p tor-llcrypto 0.42.0
cargo set-version -p tor-log-ratelim 0.42.0
cargo set-version -p tor-memquota 0.42.0
cargo set-version -p tor-memquota-cost 0.42.0
cargo set-version -p tor-netdir 0.42.0
cargo set-version -p tor-netdoc 0.42.0
cargo set-version -p tor-persist 0.42.0
cargo set-version -p tor-proto 0.42.0
cargo set-version -p tor-protover 0.42.0
cargo set-version -p tor-ptmgr 0.42.0
cargo set-version -p tor-relay-crypto 0.42.0
cargo set-version -p tor-relay-selection 0.42.0
cargo set-version -p tor-rpcbase 0.42.0
cargo set-version -p tor-rpc-connect 0.42.0
cargo set-version -p tor-rtcompat 0.42.0
cargo set-version -p tor-rtmock 0.42.0
cargo set-version -p tor-socksproto 0.42.0
cargo set-version -p tor-units 0.42.0
|
| | | |
|
| |/ |
|
| |
|
|
| |
This was experimental. Everything gated by it has been stabilised.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
| | |
|
| |
|
|
|
| |
If we build client circuits through the circuit manager, we should build
them with congestion control support.
|