| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | | |
|
| |/ / / |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | | |
relay: Remove locking from crypto task key view
See merge request tpo/core/arti!4028
|
| | | | |
| | | |
| | | |
| | | | |
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]>
|
| |\ \ \ \
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | | |
fslock-guard: Provide specialized android impls.
Closes #2544
See merge request tpo/core/arti!4030
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We need these because `File::lock()` and `File::try_lock()`
claim not to work on Android, and have to be emulated with flock.
For more information, see
<https://github.com/rust-lang/rust/issues/148325>.
Closes #2544.
Based on code by @syphyr.
Co-Authored-By: syphyr <[email protected]>
|
| | | | |
| | | |
| | | |
| | | | |
We're about to provide android-only versions of these.
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
feat: Make KeystoreEntry::new() public
See merge request tpo/core/arti!3288
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Commit 6958b6c8 changed the way the `Keystore` trait works.
The `list` method must now return a `KeystoreEntry`. Before this change,
it was essentially impossible to implement keystores outside of
`tor-keymgr`. For 3rd party users of the Arti API that want to implement
a custom keystore, it became essentially impossible to do so.
To make this work again, this commit makes KeystoreEntry::new() public,
if the experimental-api feature is enabled.
|
| |\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | | |
proto: Replace outdated references to RawCellStream
See merge request tpo/core/arti!4036
|
| | | |_|/
| |/| |
| | | |
| | | |
| | | | |
`RawCellStream` was removed long ago, in
c559754116678866eabe525f5b189b50cc78b5cc.
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
fslock-guard: Use windows-sys and GetFileInformationByHandleEx.
See merge request tpo/core/arti!3974
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Unlike winapi, windows-sys is maintained (by microsoft),
and supports more APIs. We use it elsewhere in our tree,
but this was our largest usae of winapi.
The GetFileInformationByHandleEx variant includes an
explicit buffer size to make errors harder,
and enables us to get a 128-bit file identifier,
which is (supposedly) even more unique than the 64-bit
identifiers we were looking at before.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-netdoc: implement encoding for votes' `m` items
See merge request tpo/core/arti!3998
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The new encoding impls are feature = "incomplete" so don't need to be
here.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We will test this when we test round trip parsing/encoding of votes.
For now, mark it as incomplete.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Sorting by the applicable consensus methods set seems reasonable.
The spec doesn't state the order for this. I think that's fine.
We can't expect to repro the same consensus with different software,
and we will produce stable output.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
The upshot is that we will sort digests by alg name.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
When we are generating documents that need to be stable, we need to
generate the same document regardless of what subset of digest names
we understand.
So order DigestName by its string representation.
|
| |/ / / / / |
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-proto: remove `use asynchronous_codec as futures_codec` in `/channel/handler.rs`
Closes #1690
See merge request tpo/core/arti!4026
|
| |/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`/channel/handler.rs`
Closes #1690.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Introduce family-cert for RouterDesc
See merge request tpo/core/arti!4007
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
No functional change.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Removes a comment about the virtual/real distinguishment in RouterDesc
as there are no virtual items left anymore.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This item is no longer required because we can extract it from
family_cert.
Unfortunately it requires a breaking change to the getter.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
We will need it in the next commit.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit adds the family_cert field to RouterDesc using EmbeddedCert
logic.
Unfortunately, it requires some code gymnastics similar to the (not yet
merged) identity-ed25519 certificates, which we also outlined in a
comment of a previous commit in the branch. Long story short: The
legacy parser and parse2 do not like to co-exist in the same scope due
to the self-consuming tor-cert verification chain of which the legacy
parser makes heavy use.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit modifies the legacy happy families extractor to also return
KeyUnknownCert while adding a comment explaining on why this will be
required.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit splits the inner .map() function of the happy families
extractor in the legacy parser.
In the next commit, we will return both of these variables separately,
but for now this change has no functional change and only looks
redundant.
|
| |/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
We will change the type in the next commit and this will make auditing
the next commits easier.
|
| |\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
tor-netdoc: encoding support for `w` line in routerstatus
See merge request tpo/core/arti!3991
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3991#note_3413169
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Prompted by
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3991#note_3413168
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
In the form of trait impls.
|
| | | | | | | |
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
For encoding, we need to represent the raw parameters.
This change is carefully arranged so that when the retain unknown feature is
disabled (ie, in clients), the per-router data structure remains the
same.
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | | |
Minor change which will make the next diff clearer.
|