| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This fixes a broken doc link I introduced in !1070:
```
error: unresolved link to `crate::doc::hsdesc::build::inner::HsDescInnerBuilder`
--> crates/tor-netdoc/src/doc/hsdesc/build/middle.rs:34:11
|
34 | /// [`crate::doc::hsdesc::build::inner::HsDescInnerBuilder`] as described in sections
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `HsDescInnerBuilder` in module `inner`
|
= note: `-D rustdoc::broken-intra-doc-links` implied by `-D warnings`
error: could not document `tor-netdoc`
```
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| | |
| |
| |
| |
| |
| | |
We can use a deterministic rng to generate predictable keypairs instead.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| | |
| |
| |
| |
| |
| |
| | |
This makes it possible to plug in a deterministic randomness source for
testing.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hidden services use blinded singing keys derived from the identity key
to sign descriptor signing keys.
Before this patch, the hidden descriptor builder represented its blinded
signing keys (`blinded_id`) as plain `ed25519::Keypair`s. This was not
ideal, as there was nothing preventing the caller from accidentally
initializing `blinded_id` with an unblinded keypair.
This introduces a new `HsBlindKeypair` type to represent blinded
keypairs.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
|
| |
The consensus seems to be the builders don't add much value, see [this comment].
[this comment]: https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1070#note_2889488
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
|
| |
`NetdocText` is a wrapper around a `String` and a type marker. The type
annotation proved of limited use, and made the netdoc builder API
somewhat awkward to use.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Unlike `hsdesc::IntroPointDesc`, `hsdesc::build::IntroPointDesc`
represents link specifiers as `LinkSpec`s rather than
`UnparsedLinkSpec`s.
Since this is a general-purpose representation of an introduction point
and not merely an intermediate representation for decoding/encoding, it
will probably need to be factored out of `tor-netdoc` at some point.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces the `NetdocBuilder` trait described in
`netdoc-builder.md` and a new `tor-netdoc::doc::hsdesc::build` module,
which exports the `HsDescBuilder`. Hidden services will use
`HsDescBuilder` to build and encode hidden service descriptors.
There are several TODOs in the code that I'm planning to address
separately.
Partially addresses #745.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
| |
These are used in multiple places (and will also be used by the HS
descriptor encoder later on), so let's make them named constants.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
|
|
|
| |
This makes some code a bit more concise, as it allows us to make
`Strings` into `ItemArgument`s without calling `.as_str()`.
Signed-off-by: Gabriela Moldovan <[email protected]>
|
| |
|
|
| |
TODO HS is blocking for HS release, but not for CI.
|
| |
|
|
|
| |
This version of bitflags now requires us to explicitly list the
traits that we want to derive for our bit-flags structs.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This makes our implementation behave the same as the C tor
implementation, by validating all of the expiration and signatures
on the certificates in the inner document.
(It is still not semantically necessary to check these certs: the
document in which they appear is already signed by the key with
which they are allegedly signed.)
Closes #744
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These crates have had small code changes, but no API additions:
tor-config
tor-socksproto
tor-cert
tor-chanmgr
tor-ptmgr
tor-guardmgr
tor-circmgr
tor-dirclient
tor-dirmgr
arti
tor-hsservice
tor-congestion
These crates have had API extensions:
fs-mistrust
tor-llcrypto
tor-bytes
tor-checkable
tor-linkspec
tor-netdoc
tor-persist
arti-client
|
| |
|
|
|
|
|
|
| |
(The breaking change was removing `as_days()` from IntegerMinutes.)
We are _not_ calling this a downstream-api breaking change, per
discussion at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012?commit_id=bb2ab7c2a3e0994bb438188511688b5b039cae29#note_2876819
|
| |
|
|
|
|
| |
These are API breaks, but the crates themselves are currently
100% experimental, so there's no need to bump the minor versions
according to our semver rules.
|
| |
|
|
| |
Fixes #756
|
| | |
|
| |\
| |
| |
| |
| | |
HsDesc: Use a new UnparsedLinkSpecifier to avoid leaking which linkspec types we know
See merge request tpo/core/arti!1029
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It said to check whether C enforces an absence of extraneous bytes
at the end of the link specifiers. It does, in
`hs_desc.c:decode_link_specifiers()`, where it says:
```
if (link_specifier_list_parse(&specs, decoded,
(size_t) decoded_len) < decoded_len) {
goto err;
}
```
The comparison with "decoded_len" checks whether all the bytes were
decoded.
|
| |\
| |
| |
| |
| |
| |
| | |
tor-netdoc: Abolish PauseAt in favour of using itertools
Closes #760
See merge request tpo/core/arti!1021
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
Nothing uses these now; the NetDocReader is simply an iterator, itself.
|
| | | |
|
| | |
| |
| |
| | |
This simplifies the return type!
|
| | |
| |
| |
| | |
This will simplify things at many call sites.
|
| | |
| |
| |
| | |
We're going to want this a bit more widely.
|
| | | |
|
| | |
| |
| |
| | |
This is the last use of PauseAt.
|
| | |
| |
| |
| |
| |
| |
| | |
We can just make a new PauseAt, since it can take the inner peekable
iterator by mutable reference.
This seems to tidy the code up a bit too.
|
| | |
| |
| |
| |
| |
| | |
There's a blanket impl of Itertor for &mut impl Iterator, so this
isn't necessary, and it prevents us passing iterators by value
producing syntactic vinegar.
|
| | |
| |
| |
| |
| | |
This makes things easier to read. We're about to add another
site (albeit, temporarily).
|
| |/
|
|
| |
Fixes #772
|
| |
|
|
|
|
| |
I've been running this for 5 minutes and haven't found any
crashes. I'll run it for an hour or two, then add the results to the
corpus repository.
|
| |
|
|
|
|
|
| |
We want to fuzz these parsers, but there's no currently way to get
at the parsers for inner documents without going through a lot of
encryption. (Coverage-guided fuzzers are powerful, but they
can't find SHA3 preimages.)
|
| |\
| |
| |
| |
| | |
Introduce new batching iterator and use it in two places
See merge request tpo/core/arti!1016
|
| | | |
|
| | |
| |
| |
| | |
And another UNSTABLE warning.
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
And explain why we're not using booleans.
|
| | | |
|
| | | |
|