aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-netdoc/src/doc/hsdesc/outer.rs
Commit message (Collapse)AuthorAgeFilesLines
* tor-checkable: Rename `TimeBound::check_valid_*` to `if_valid_*`Ian Jackson2026-07-231-1/+1
| | | | | | | I find these names confusing. To my mind "check" implies a function returning `Result<(), _>`. Some other APIs use `unwrap` here but I think `if` is good.
* Use new TimeRangeBound name throughout the treeIan Jackson2026-07-161-3/+3
|
* 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-4/+2
| | | | 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-5/+7
| | | | | | | | | | | | | | 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.
* Suggestions from @gabi-250 on prop360 implementation.Nick Mathewson2025-07-101-2/+2
|
* netdoc: disallow extraneous space within final signature itemNick Mathewson2025-07-101-1/+39
| | | | Part of proposal 360.
* 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.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* netdoc: fill in some test dataNick Mathewson2023-06-231-2/+6
| | | | | This resolves some TODO HS items now that we are confident we want to have these actual examples in our tests.
* Replace usage of KeyUnknownCert::check_key.Nick Mathewson2023-05-161-1/+1
|
* netdoc: Rename `ParseError{Kind, Source}` to `NetdocError{Kind, Source}`.Gabriela Moldovan2023-05-101-1/+1
| | | | | | | | | | | `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
|
* Add builder for encoding hidden service descriptors.Gabi Moldovan2023-03-241-4/+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]>
* Turn two blocking TODOs in hsdesc into "TODO HS"Ian Jackson2023-03-211-1/+1
| | | | TODO HS is blocking for HS release, but not for CI.
* tor-netdoc: Clarify that we must indeed check cert expiration.Nick Mathewson2023-03-011-3/+1
|
* tor-netdoc: Validate inner certs in HsDescNick Mathewson2023-03-011-1/+11
| | | | | | | | | | | | 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
* tor-netdoc: Remove many needless calls to .iter() and .into_iter()Ian Jackson2023-02-151-3/+2
|
* netdoc: Add a feature to expose hsdesc inner doc parsersNick Mathewson2023-02-141-0/+2
| | | | | | | 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.)
* hsdesc: Use an IntegerMinutes<u16> to hold lifetime.Nick Mathewson2023-02-081-5/+5
|
* netdoc: Fix most "TODO HS rename" commentsNick Mathewson2023-02-081-1/+0
|
* netdoc::hsdesc: Distinguish layer from document.Nick Mathewson2023-02-081-7/+7
|
* netdoc::hsdesc: Rename "layer" modules.Nick Mathewson2023-02-081-0/+310