| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |/ / |
|
| |\ \
| |/
|/|
| |
| | |
Apply safelog to more of the things that we log
See merge request tpo/core/arti!693
|
| | |
| |
| |
| |
| | |
We now log connection attempts at debug!, and mark relay target
addresses as sensitive.
|
| | |
| |
| |
| |
| |
| |
| | |
This commit largely follows the example for resolve_alternative_specs.
The difference is that there are two fields, so we use a macro to
avoid recapitulating the field names.
|
| | | |
|
| |/
|
|
|
| |
We're going to want this functionality, which isn't in the stable
stdlib.
|
| |
|
|
|
|
| |
Arti is not designed to be a setuid-safe program.
Part of #523.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This commit is just the necessary plumbing. The config is currently
empty. We'll add something to it, for padding control, later.
|
| |
|
|
| |
This will be used for controlling channel padding, for now.
|
| |
|
|
|
|
|
| |
This is more standard. It also provides the ::build() method.
This isn't a config type, and build failures ought not to happen,
so we use Bug for the error.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This is a compile-time feature with an associated configuration
flag, both enabled by default.
When it's turned on, hardening prevents the arti process from
dumping core or being attached to by low-privileged processes.
(This is a defense-in-depth measure, not an absolute way to prevent
attacks. For more information, see
[`secmem_proc`](https://docs.rs/secmem-proc/0.1.1/secmem_proc/).)
Closes #364.
|
| |\
| |
| |
| |
| |
| |
| | |
Reduce the arti crate's API surface; improve semver documentation.
Closes #522, #530, and #532
See merge request tpo/core/arti!664
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The remaining unconditionally public APIs are those related to our
configuration objects, and the main_main() API.
The rationale for making main_main() public is to have an actual
entry point.
The rationale for making the config APIs public is:
1. We really do intend for others to be able to read our
configuration files using this API.
2. The structure of our configuration files is already part of our
interface.
Closes #530.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit implements the round-trip-time estimation algorithm from Tor
proposal 324, validating the implementation against the test vectors
found in C tor. (Note that at the time of writing, the new test vectors
may not be committed to C tor yet, but they will be soon.)
This also adds the necessary consensus parameters to `NetParameters`.
Some of them have been renamed in order to (hopefully) make them more
understandable.
|
| |\ \
| | |
| | |
| | | |
# Conflicts:
# crates/tor-netdir/semver.md
|
| | |/
| |
| |
| |
| |
| |
| |
| | |
Now we have bus>1 ownership of the crate name `shellexpand`. I have
made a release, and retired `shellexpand-fork`.
The new shellexpand release switches to a (quite similarly) unforked
version of `dirs`.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This Writer is a simple wrapper around `Vec<u8>` that makes sure
that its contents are cleared whenever they are dropped _or
reallocated_.
The reallocation is the important part here: without that, we risk
not zeroizing the first allocation of the buffer.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using `zeroize` here tells these crates that they should make
various structures zeroize-on-drop.
(This is not yet implemented in `aes` 0.8.1, but support has been
merged in the repository for `aes`, so it should go out in the next
release.)
No corresponding feature flag is needed to enable zeroize-on-drop
for `rsa` and `*25519-dalek` private keys.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This had to become a new internal function, since at the point that
the handshake needs this code, it does not yet have a Channel to use.
This change made the error messages in the handshake code more
informative: and now they require a regex to check. Later, we might
want to defer formatting these strings, but I don't think we need
to do it now.
|
| | |
| |
| |
| |
| |
| |
| | |
Doing this will make sure that we fix a correctness issue in netdir that
will be caused if we add more IDs.
(Also add RelayIdType::COUNT in tor-linkspec.)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The formats used here are backward-compatible with those used by C
tor and those used elsewhere in our code. We need a way to encode
_both_ current kinds of identities as a string that tells you what
kind of ID they are. Traditionally we have used hexadecimal,
sometimes with a $, for RSA ids, and we have used base64 for Ed25519
IDs.
We also introduce a new forward-compatible format for new identity
keys in the future. (The new format is the key identity type, a
colon, and the id encoded as base64.) We will use this new format
_only_ when we need to encode identities in a way where it would be
otherwise unclear what kind of key we are dealing with.
|
| | |
| |
| |
| |
| |
| |
| | |
I wonder if these types are correct. I think it makes sense to have
a Ref type like this, rather than just using `&RelayId`, but it
doesn't seems that I can make `RelayId` and `RelayIdRef` implement
Borrow and ToOwned for one another, so maybe I've messed up.
|
| |/
|
|
|
| |
This will allow RelayIds to replace IdPair in tor-guardmgr. (The
fields are named accordingly with `serde(rename)`.)
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This allows us to give better errors in the case where bootstrapping
succeeds at first, but fails thereafter for long enough to make our
directory expire.
|
| | |
|
| |
|
|
|
| |
It turns out that phf 0.11 depends on Rust 1.60, which is above our
MSRV.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We need to replace the AtomicBool for dormant mode with something that
can wake up tasks. postage::watch is the right shape.
But we want to be able to update it but suppress no-op updates.
(There is going to be a call site where no-op updates can occur.)
In the absence of a suitable upstream method as requested here
https://github.com/austinjones/postage-rs/issues/56
we introduce this facility via an extension trait.
|
| |
|
|
|
| |
This does not require a change in any other crate, since
the change here does not affect tor-dirmgr's APIs.
|
| |\
| |
| |
| |
| |
| |
| | |
Implement functionality to construct signed Ed25519 certs.
Closes #511
See merge request tpo/core/arti!611
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is behind a feature flag, since it isn't needed for pure
clients: only onion services and relays need this.
I've named the object that constructs these certs
`Ed25519CertConstructor` because it doesn't follow the builder
pattern exactly: mainly because you can't get an Ed25519Cert out of
it. _That_ part is necessary because we require that an Ed25519Cert
should only exist if the certificate was found to be well-signed
with the right public key.
Closes #511.
|
| |\ \
| | |
| | |
| | |
| | | |
tor-persist: Big refactoring on Error type.
See merge request tpo/core/arti!614
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Every error now has an action (what we were trying to do), a
resource (what we were trying to do it to), and a source (what
problem we encountered).
Initially I tried to add "action" and "resource" fields to error
variants individually, but that led to a combinatorial explosion.
Part of #323.
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Update `rsa` dependency (and use `x25519-dalek` prerelease)
Closes #448
See merge request tpo/core/arti!612
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- arti#448 and arti!607 highlight an issue with upgrading `rsa`: namely,
the `x25519-dalek` version previously used has a hard dependency on
`zeroize` 1.3, which creates a dependency conflict.
- However, `x25519-dalek` version `2.0.0-pre.1` relaxes this dependency.
Reviewing the changelogs, it doesn't look like that version is
substantially different from the current one at all, so it should be
safe to use despite the "prerelease" tag.
- The new `x25519-dalek` version also bumps `rand_core`, which means we
don't have to use the RNG compat wrapper in `tor-llcrypto` as much.
closes arti#448
|
| |/ |
|
| |
|
|
|
|
| |
This fixes a complaint from cargo audit about
https://rustsec.org/advisories/RUSTSEC-2022-0032
in openssl.
|
| |
|
|
|
|
| |
This new release checks for invalid symbols in non-padded inputs
for decoding. Therefore, we can get rid of the logic implemented
in `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600`
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were done with the following commands:
```
cargo set-version -p tor-basic-utils --bump patch
cargo set-version -p fs-mistrust --bump minor
cargo set-version -p tor-error --bump patch
cargo set-version -p tor-config --bump patch
cargo set-version -p tor-units --bump patch
cargo set-version -p tor-rtcompat --bump minor
cargo set-version -p tor-llcrypto --bump patch
cargo set-version -p tor-bytes --bump minor
cargo set-version -p tor-socksproto --bump minor
cargo set-version -p tor-cert --bump minor
cargo set-version -p tor-cell --bump minor
cargo set-version -p tor-proto --bump minor
cargo set-version -p tor-netdoc --bump patch
cargo set-version -p tor-netdir --bump minor
cargo set-version -p tor-persist --bump patch
cargo set-version -p tor-chanmgr --bump minor
cargo set-version -p tor-guardmgr --bump minor
cargo set-version -p tor-circmgr --bump patch
cargo set-version -p tor-dirclient --bump patch
cargo set-version -p tor-dirmgr --bump minor
cargo set-version -p arti-client --bump patch
cargo set-version -p arti --bump minor
cargo set-version -p arti-bench --bump minor
cargo set-version -p arti-testing --bump minor
```
|