| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | | |
| | |
| | |
| | | |
tor-proto now depends on tor-netdir.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Note: this commit makes `tor-proto` depend on `tor-netdir`
(because it adds a `KistParams` type that is buildable from
`NetParameters`, which is defined in `tor-netdir`).
Closes #1729
|
| |/ /
| |
| |
| |
| |
| | |
These are tentative, so I haven't added them to param-spec yet.
Part of #1729
|
| |\ \
| | |
| | |
| | |
| | | |
tor-rtmock: Fix task lists when panicking due to stall and tasks unstick each other in Drop
See merge request tpo/core/arti!2682
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, if r is Pending, `fut` is moved out of (stored in
`task.fut`), whereas if r is Ready, it is retained and then dropped at
the end of the loop iteration. This is quite subtle, and involves
`fut` being in a "maybe moved out of" state (which cannot be
represented in Rust's surface type system) after the block with the
`data` lock.
Let's write code that more clearly ensures that the compiler DTRT.
|
| | | |
| | |
| | |
| | |
| | | |
This passes right now, but only because the lifetime of the `fut`
variable in `execute_until_first_stall` happens to be right.
|
| | | | |
|
| | | | |
|
| | | | |
|
| |/ /
| |
| |
| | |
(We don't add it to the handful of unit tests that don't use an executor.)
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
fs-mistrust: Facilities for file access
Closes #1746
See merge request tpo/core/arti!2707
|
| | |
| |
| |
| |
| | |
This approach makes it even less likely for people to store a
FileAccess for repeated use.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
When we're not bound to a CheckedDir, it doesn't make sense to
forbid following symlinks, so long as their targets are also
sensible.
|
| | | |
|
| | |
| |
| |
| | |
There is no reason for these to consume self.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
These are the methods which we'd like to give new options in #1746;
we can move other methods later if we want to.
|
| | |
| |
| |
| |
| | |
We're going to move functionality and configuration functions here
to implement #1746.
|
| | | |
|
| | | |
|
| | | |
|
| |\ \
| |/
|/|
| |
| | |
arti-relay: add lints
See merge request tpo/core/arti!2708
|
| | | |
|
| |/ |
|
| |\
| |
| |
| |
| |
| |
| | |
tor-relay-crypto Add high-level cert types implementing ToEncodableCert
Closes #1777
See merge request tpo/core/arti!2672
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
There is no need for validation here. If any validation is required, it
will be handled by the calling code.
Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/2672?commit_id=10845d5e6a06d4d9548d536846eb470128d8a7d4#note_3147517
|
| | |
| |
| |
| |
| | |
No longer used, because we're now using `ParsedEd25519Cert` instead of
`KeyUnknownCert` to represent parsed but not yet validated certs.
|
| | |
| |
| |
| |
| |
| |
| | |
This helps us get rid of our uses of `KeyUnknownCert`. Needed because
`KeyUnknownCert` can't readily be converted back to `EncodedEd25519Cert`
(while `ParsedEd25519Cert` *can* -- see the `certs` module from
`tor-relay-crypto`).
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This will come in handy later on, when we start using these function in
conjunction with `KeyMgr::get_or_generate_key_and_cert`, which expects
the `make_certificate` callback to return a type that implements
`ToEncodableCert`.
|
| | |
| |
| |
| | |
Closes #1777
|
| | |
| |
| |
| |
| |
| | |
These will be the `ToEncodableCert`s we write to the keystore.
Part of #1777
|
| | |
| |
| |
| |
| | |
This will enable us to retrieve it from the keystore as an `ErasedKey`
(side note, we should rename `ErasedKey` to `ErasedItem`).
|
| | | |
|
| | |
| |
| |
| | |
We'll soon use this.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will enable us to deserialize byte slices as `EncodedEd25519Certs`.
Needed because this type will be used to representing a parsed + validated
cert retrieved from the keystore.
Technically, we *could* do without this function by defining a separate
newtype wrapper over `Vec<u8>` to represent the validated cert data, but
IMO adding a second encoded ed25519 cert type in another crate might be
confusing later down the line (because the two types will be nearly
identical, and are bound to eventually diverge in terms of API and
implementation).
Part of #1137
|
| | |
| |
| |
| |
| |
| | |
This updates and reenables the cert management tests.
Part of #1768
|
| | | |
|
| | |
| |
| |
| | |
Part of #1768
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This will soon be used, when we modify the `ArtiNativeKeystore` cert
lookup code to actually parse certificates before returning them.
Part of #1768
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`KeyUnknownCert` will soon be used as the `ToEncodableCert::ParsedCert`
type for Tor ed25519 certs.
For example, the `ToEncodableCert` impl for `RelaySigningKeyCert` will
look like this:
```rust
pub struct RelaySigningKeyCert(EncodedEd25519Cert);
impl ToEncodableCert<RelaySigningKeypair> for RelaySigningKeyCert {
type ParsedCert = KeyUnknownCert;
type EncodableCert = EncodedEd25519Cert;
type SigningKey = RelayIdentityKeypair;
fn validate(
cert: Self::ParsedCert,
subject: &RelaySigningKeypair,
signed_with: &Self::SigningKey,
) -> Result<Self, InvalidCertError> {
// TODO: validate `KeyUnknownCert`
// and convert it to an EncodedEd25519Cert
// (we don't yet an easy way to perform this conversion)
}
fn to_encodable_cert(self) -> Self::EncodableCert {
self.0
}
}
```
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This is necessary because `ParsedCert`s will not be `EncodableItem`s.
This is because we cannot (and don't want to) write certificates that
have not yet been validated to the keystore. They do need to be
retrievable from the keystore though, so we also change `ErasedKey`
to be `Box<dyn ItemType>` instead.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need two different types to represent
* certs that have been parsed, but not yet validated
(`KeyUnknownCert`)
* newly generated encodable certs (`EncodedEd25519Cert`)
Currently, we don't use `KeyUnknownCert` anywhere, and instead use
`EncodedEd25519Cert` to represent "parsed" but not-yet-validated certs.
This approach is wrong and relies on a broken (no-op)
`EncodedEd25519Cert::from_bytes` implementation. A future commit will
address this problem by replacing `EncodedEd25519Cert::from_bytes` with
`Ed25519Cert::decode` to actually parse the cert upon retrieving it from
the keystore.
|