| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| | |
There's a blocking TODO here about exposing socks error codes that
I still need to solve.
|
| |/
|
|
|
|
| |
Requires #1523.
Implements #1524.
|
| |
|
|
| |
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
| |
Everything copied in the previous commits to tor-keys is now removed and
tor-keys crate is used accross the code.
Minor changes to tor-keys to accomodate this change.
Part of #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
As stated in the comment added in this commit, this is temporary as we
want tor-hscrypto to start using tor-keys and define these
implementation there.
Part of #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move EncodableKey, ToEncodableKey and Keygen to tor-keys crate from
tor-keymgr.
To pull this off, an err.rs was added taken from tor-keymgr but stripped
down to what was needed only. No code was changed in any of the files
copied from tor-keymgr.
Our deftly macro now auto implement these traits for the key wrapper
type created. This gives the ability of the wrapper to be used by a
tor-keymgr::Keystore.
In order to pull this off, most of the SSH code has been moved into this
crate (ssh.rs) meaning that its ABI/API now resides in the tor-keys
trait outside of tor-keymgr.
Note that Sealed was not put back because the deftly macro is designed
to be used outside of this crate and thus implementing EncodableKey. The
alternative is that we would need to force all arti keys to be declared
in this crate which is not great because it then exposes all these key
types to the world outside their subsystem.
Part of #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The derive ed25519 keypair macro now implements the keymgr trait so the
key wrapper can now be used with a keystore without needing to specify
it in the tor-keymgr crate.
For this to work, a slight change to the KeygenRng trait was needed as
in to expect the CryptoRngCore trait which is what ed25519-dalek
requires.
And also, the removal of the Sealed trait since now it is accepted to
implement these traits outside tor-keymgr.
Fixes #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
|
| |
At this commit, we also add a derive-deftly macro for ed25519 keypair
along a helper macro that can define a wrapper around a lower-level
ed25519::Keypair.
Part of #1137
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
| |
Including testing that uncommenting the example generates a config
with tracking enabled, and that the example low_water is the default
value for the example max.
|
| | |
|
| | |
|
| |
|
|
|
| |
This breaks config tests in crates/arti which test configuration
parsing of disabled experimental features.
|
| |
|
|
|
|
| |
* In arti, memquota simply turns on in memquota arti-client
* In arti-client, add an (unconditional) dependency on tor-memquota,
and have the memquota feature turn on the feature in tor-memquota.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow a `Config` to represent "this is supposed to be disabled".
This involves wrapping the actual built configuration in an IfEnabled.
We treat max = usize::MAX, or max being unspecified, as "disable".
We can now reporting an error during config building if max is set but
we're compiling the feature out. Conversely, we can now make
`MemoryQuotaTracker::new()` unconditional, since enabled
confiogurations are uninhabited when the feature is compiled out.
We change how we derive the setters, deriving them from the Builder.
I chose to abolish the use of derive_builder. See the new comment on
ConfigBuilder.
|
| |
|
|
|
| |
We're about to change the config behaviour; adding these tests first
allows us to demonstrate the changes.
|
| |
|
|
|
|
|
|
| |
Done using:
```
cargo set-version --bump patch -p arti
```
|
| |
|
|
|
|
|
|
|
|
| |
Done using:
```
for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do
cargo set-version -p $crate 0.22.0
done
```
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bumps the versions of the non-{arti,tor-}
crates that have non-functional changes:
- fslock-guard (updated rustdoc-args)
- equix (comment typo fixes)
- caret (updated rustdoc-args)
- safelog (updated rustdoc-args)
- retry-error (updated rustdoc-args)
And of the pre-1.0.0 crates that have new APIs:
- fs-mistrust (new `CheckedDir::metadata` API)
Done using
```
for c in "${non_tor[@]}"; do maint/bump_nodep $c; done
```
where `non_tor` contains the list above
|
| |
|
|
| |
This is the first time we're publishing this, so let's start at 0.1.0.
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| | |
Fix reproducible build CI job for macOS
Closes #1394 and #1507
See merge request tpo/core/arti!2377
|
| | |
| |
| |
| | |
Fixes: tpo/core/arti#1507.
|
| | | |
|
| | |
| |
| |
| |
| | |
Now that `oneshot-fused-workaround` is its own crate, `tor-rtmock` doesn't need
`tor-async-utils`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Having this in the `tor-async-utils` crate prevents us from doing both
of the following without introducing a circular dependency:
* using it in `tor-rtmock` (which we currently do, particularly in
tests).
* using `tor-rtmock` to test things in `tor-async-utils`. We don't do
this yet, but it is generally sensible to do so. In particular we
want to move the `stream_peak` module there, which is currently tested
with `tor-rtmock`.
Moving this into its own crate avoids this circular dependency.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This type exists in the `arti` crate. It wraps and delegates to
`arti_rpcserver::RpcSession`. Subsequent commits will use it to
expose information from the `arti` crate to the RPC system; right
now it does nothing.
|
| | |
| |
| |
| | |
This finally makes this type suitable for parsing in config files.
|
| | |
| |
| |
| | |
Display can now choose appropriate units.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
tor-hsservice: Add watcher for restricted_discovery config changes
Closes #1505
See merge request tpo/core/arti!2353
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The watch channel should help prevent flakiness in the tests
(`TestModule` uses `maybe_send` to only send the received config if it's
different from the previously received value. This is supposed to
prevent the tests from failing when duplicate update events are
received).
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Sometimes it's useful to know what files/directories are being watched.
For example, the descriptor publisher needs to know in order to figure
out if it needs to update the watcher in response to changes in the
config.
|
| | | |
| | |
| | |
| | | |
The `FileWatcher` now uses a `postage::watch` channel under the hood.
|
| | | |
| | |
| | |
| | |
| | | |
The event handler will soon be made async, so we need a handle to the
runtime.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For the most part, this is just code motion.
The only change here is that `prepare` is no longer a method on
`FileWatcher`. This decouples `FileWatcher` from `ConfigurationSources`,
enabling us to use it to watch files and directories that aren't
configuration.
|
| |\ \ \
| |_|/
|/| |
| | |
| | |
| | |
| | | |
tor-ptmgr: make managed PTs optional ('managed-pts' feature flag)
Closes #1334
See merge request tpo/core/arti!2354
|
| | | |
| | |
| | |
| | |
| | | |
This conditionally compiles most of the code related to managed
transports.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
Add and use `PeekableStream` and `UnobtrusivePeekableStream`
See merge request tpo/core/arti!2345
|
| | | | |
|
| | |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Now it exists unconditionally so that we can have our assertion for
public key consistency happen unconditionally. (Blinding secret
keys is not remotely in the critical path, so I'm not concerned
about the critical path.)
From a suggestion from Gabi on !2341.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the basic TorRelayConfig object along a builder in order to
create a TorRelay object.
At this commit, the configuration object only holds a "StorageConfig"
which is a simple starting point which will allow to expand to a KeyMgr
and then a ChanMgr along more configuration.
There is also no custom Error for the crate at this point.
Fixes #1534
Signed-off-by: David Goulet <[email protected]>
|
| |
|
|
|
|
|
|
|
| |
Unlike generational-arena, slotmap is maintained.
Unlike slotmap, slotmap-careful should never be able to reuse the
same key for two different objects.
Closes #1282.
|
| |\
| |
| |
| |
| | |
New `slotmap-careful` crate to use when we mustn't re-use keys.
See merge request tpo/core/arti!2298
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This crate works as a drop-in replacement for
the generational arena types
`slotmap::{SlotMap, DenseSlotMap, HopSlotMap}`,
and is implemented a set of wrappers around those types.
The wrappers guarantee that slot versions numbers can never wrap
around by marking as unusable any slot whose version number
would otherwise get too high. (We add some leeway between our max
allowed version number and the largest possible version number,
so that we can detect bugs.)
The code relies on the serde encoding of slotmap key versions.
For notes on stability and (surprisingly good) performance,
see the comments.
Test coverage is around 98% for the lib.rs file; it's lower in
key_data.rs, since the error cases are unreachable given
slotmap's current behavior.
Open questions:
* What further testing is a good idea?
* Will slotmap ever upstream something like this?
See "# Limitations" comment for the parts of slotmap that are not
implemented; I hope that we don't need them.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Nightly rust doesn't like it when you have a `match` arm that can
never be reached because of an uninhabited type. As such,
we can't say stuff like:
```
let x: Option<Void> = ...;
match x {
Some(_) => unreachable!(),
None => ...
}
```
|
| |\ \
| | |
| | |
| | |
| | | |
RPC: Method to expose a list of RPC methods.
See merge request tpo/core/arti!2332
|