aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/hsdesc/middle.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use new TimeBound name throughout the treeIan Jackson2026-07-161-1/+1
|
* maint: Run maint/add_warning to deny string slicesClara Engler2026-06-091-0/+1
| | | | | | | | | | | | This commit executes maint/add_warning with the just added change to deny string slices except in tests. I recommend auditing this by checking out the previous commit followed by running the script yourself and then verifying that the diff is identical to this commit. This commit makes cargo clippy fail. We will add exceptions in the next commit.
* tor-netdoc: Un-gate every cfg feature = "hsdesc-inner-docs"Ian Jackson2026-04-301-6/+3
| | | | Part of #2492 phase 2.
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-2/+2
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* tor-netdoc: Removed dependency on `once_cell`hashcatHitman2025-06-141-2/+2
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* netdoc: Make some parsing init functions fallible.Nick Mathewson2025-03-171-1/+1
| | | | | | | I'm about to make our parsers reject some strings at construction time, so it makes sense to have these functions become fallible. This is a breaking change.
* tor-netdoc: Wrap some too-long comments and docs.Gabriela Moldovan2024-10-031-1/+2
|
* tor-netdoc: Use the new "restricted discovery" terminology.Gabriela Moldovan2024-10-031-1/+1
| | | | Part of #1476
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Merge branch 'explain_952_fix' into 'main'Nick Mathewson2023-07-111-0/+3
|\ | | | | | | | | Explain the code for the #952 fix. See merge request tpo/core/arti!1391
| * Explain the code for the #952 fix.Nick Mathewson2023-07-101-0/+3
| | | | | | | | | | Let's explain what Trinity did in its fix for #952, so that we know why this code is here the next time we find it.
* | Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|/
* be more lenient while parsing inner hs desctrinity-1686a2023-07-071-1/+6
|
* netdoc: replace a test TODO with a reference to other testsNick Mathewson2023-06-261-1/+8
| | | | The tests called for here already existed.
* netdoc: fill in some test dataNick Mathewson2023-06-231-4/+6
| | | | | This resolves some TODO HS items now that we are confident we want to have these actual examples in our tests.
* netdoc: Introduce HsDescErrorNick Mathewson2023-06-221-3/+10
| | | | | | | | | | For higher-level HsDesc-related functions, this type indicates where exactly an error occurred. It lets us distinguish decryption errors from parsing errors, and attribute responsibility to the hsdir, the onion service, or the user's lack of encryption. This lets us remove some just-introduced complexity in tor-hsclient.
* netdoc::doc::hsdesc changes to let us downgrade/remove allowsNick Mathewson2023-06-161-1/+1
|
* netdoc: use ct_lookup for rend descriptor cookie lookupNick Mathewson2023-06-161-6/+3
| | | | | (I doubt that there is a viable side channel here, but still we might as well get in the habit of doing these things properly.)
* netdoc: Downgrade an HS todo wrt HS_DESC_AUTH_TYPENick Mathewson2023-06-161-2/+3
|
* netdoc: Rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.Gabriela Moldovan2023-05-101-2/+2
| | | | | | | | | | | `ParseErrorSource` was originally meant to represent a parsing error, this enum has since gained some variants that aren't really parsing related (`Signature`, `CertSignature`, `UntimelyDescriptor`). Since this error type is now used for general-purpose netdoc errors, let's rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`. Signed-off-by: Gabriela Moldovan <[email protected]>
* tor-netdoc: Expose test data under new "testing" feature flagIan Jackson2023-04-051-1/+1
|
* Stop requiring the caller to supply `AuthClient`s.Gabriela Moldovan2023-03-311-33/+10
| | | | | | | | | | | | | | | | | | `AuthClient`s were originally meant to represent parsed `auth-client` lines. In !1070, this struct was repurposed for representing individual authorized clients in the HS descriptor encoder. However, hidden services will likely use a list of public keys to represent the authorized clients rather than a list of `AuthClient`s, as the information from an `AuthClient` (`client_id`, `iv`, `encrypted_cookie`) likely won't be immediately available to the hidden service. This change updates the HS descriptor encoder to represent authorized clients as a list of `curve25519::PublicKey`s. As such, it is now the responsibility of the encoder to create the `client_id`, `iv`, and `encrypted_cookie` using the available keys, the unencrypted descriptor cookie, and HS subcredential. Signed-off-by: Gabriela Moldovan <[email protected]>
* Add builder for encoding hidden service descriptors.Gabi Moldovan2023-03-241-7/+10
| | | | | | | | | | | | | | 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]>
* Define constants for `AuthClient` field lengths.Gabriela Moldovan2023-03-241-6/+9
| | | | | | | 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]>
* tor-netdoc: Remove many needless calls to .iter() and .into_iter()Ian Jackson2023-02-151-2/+1
|
* netdoc: Add a feature to expose hsdesc inner doc parsersNick Mathewson2023-02-141-0/+3
| | | | | | | 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.)
* Rename DescEncNonce => HsDescEncNonceNick Mathewson2023-02-091-2/+2
|
* netdoc: Fix most "TODO HS rename" commentsNick Mathewson2023-02-081-3/+5
|
* netdoc::hsdesc: Distinguish layer from document.Nick Mathewson2023-02-081-13/+13
|
* netdoc::hsdesc: Rename "layer" modules.Nick Mathewson2023-02-081-0/+289