summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
* Bump version of tor-basic-utilsIan Jackson2025-08-051-2/+2
| | | | This was accidentally omitted from my version bump script.
* Version bumps for 1.4.6Ian Jackson2025-08-051-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made with the following shell script: export CARGO='nailing-cargo -Eu' # Non-functional changes only maint/bump_nodep hashx # Special $CARGO set-version -p arti 1.4.6 # Additional features, no breaking changes, depended on in tree $CARGO set-version -p safelog 0.4.8 # Unconditional bump to 0.33.0 xargs -I P <<END $CARGO set-version -p P 0.33.0 tor-error tor-general-addr tor-geoip tor-rtcompat tor-rtmock tor-async-utils tor-config tor-config-path tor-rpc-connect tor-log-ratelim tor-rpcbase tor-memquota tor-units tor-llcrypto tor-bytes tor-protover tor-checkable tor-cert tor-key-forge tor-hscrypto tor-socksproto tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-relay-selection tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy tor-relay-crypto arti-client arti-relay arti-rpcserver arti-ureq arti-rpc-client-core END
* Merge branch 'prop360-combined' into 'main'Nick Mathewson2025-07-105-9/+177
|\ | | | | | | | | | | | | Implement proposal 360 (limit HsDesc inflation opportunities) Closes #2046 See merge request tpo/core/arti!3070
| * Suggestions from @gabi-250 on prop360 implementation.Nick Mathewson2025-07-101-2/+2
| |
| * netdoc, hsservice: Respect maximum descriptor sizesNick Mathewson2025-07-101-2/+17
| | | | | | | | | | It would be better to take a more sophisticated approach; see #2048.
| * netdoc: Add note about prop360Nick Mathewson2025-07-101-0/+6
| |
| * netdoc: Tread a few more kinds of errors as suspicious.Nick Mathewson2025-07-101-1/+6
| | | | | | | | | | In particular, these are errors that provide an opportunity to inflate the size of an hsdesc download.
| * hs*: Define some HsDesc errors as _suspicious_.Nick Mathewson2025-07-101-0/+22
| | | | | | | | | | These errors are suspicious as hsdir inflation attacks, in the context of prop360.
| * netdoc: disallow extraneous space within final signature itemNick Mathewson2025-07-103-1/+51
| | | | | | | | Part of proposal 360.
| * netdoc: Fix Item::end_pos() behavior, and add tests.Nick Mathewson2025-07-101-6/+30
| | | | | | | | | | Previously it didn't include end-of-line space, even though the docs said it did.
| * Add test to enforce parser behavior wrt start-of-line space.Nick Mathewson2025-07-101-0/+46
| |
* | Typo fixes (automatic and hand-verified)Nick Mathewson2025-07-091-1/+1
|/ | | | Made with https://crates.io/crates/typos-cli
* Bump all the unstable tor- and arti- crates to 0.32.0.Gabriela Moldovan2025-07-071-13/+13
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.32.0 done ```
* Temporarily suppress mismatched_lifetime_syntaxes.Gabriela Moldovan2025-07-071-0/+1
| | | | See #2060.
* tor-netdoc: Upgrade to phf 1.12.1.Gabriela Moldovan2025-07-071-1/+1
|
* tor-netdoc: Removed dependency on `once_cell`hashcatHitman2025-06-1410-41/+41
| | | | | | - Replaced `once_cell::sync::Lazy` with `std::sync::LazyLock`. Signed-off-by: hashcatHitman <[email protected]>
* release: Bump all tor-/arti- crates to 0.31.0.Alexander Hansen Færøy2025-06-051-13/+13
| | | | | | | | This was done using: for crate in $(./maint/list_crates | grep -P '^tor-|^arti-'); do cargo set-version -p $crate 0.31.0 done
* ./maint/cargo_sort: Run cargo-sort on the entire workspace.Gabriela Moldovan2025-05-271-1/+4
| | | | | | | | | | | | | | | | | | | The [latest version] of `cargo-sort` is more opinionated than the previous one, and is now causing the `rust-checks` job to fail on `main`. This commit applies the fixes needed to satisfy the new `cargo-sort` rules. These changes were generated by running `cargo sort --workspace` several times, until `cargo sort --check --workspace` finally succeeded (it couldn't fix all the errors in one go, for some reason). I have omitted the changes `cargo-sort` made to the top-level `Cargo.toml`, to preserve the topological ordering of the workspace members. Closes #2014 [latest version]: https://github.com/DevinR528/cargo-sort/blob/f066ae80e5e6f5c1d8f0e2b8099461dcb97d9656/changelog.md#200
* hs: Prevent a client from using a `MiddleOnly` relay for onion servicesNeel Chauhan2025-05-201-4/+0
| | | | | | > The actual impact of this patch is to prevent usage of MiddleOnly > relays as Introduction Points. The Rendezvous Point logic isn't > hooked up yet - nick
* Resolve clippy warnings from 1.83Nick Mathewson2025-05-134-10/+6
| | | | | Now that our MSRV is 1.83, clippy is happy to make more recommendations for us.
* All crates: bump rust-version to 1.83.Nick Mathewson2025-05-131-1/+1
|
* release: Bump all unstable tor/arti crates to 0.30.0Wesley Aptekar-Cassels2025-05-011-13/+13
| | | | | | | | ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.30.0 done ```
* Update rand requirement to 0.9.1Nick Mathewson2025-04-291-1/+1
| | | | | (This is going to be a _requirement_, since rand 0.9.1 has a behavioral change from 0.9.0)
* Run cargo update.Wesley Aptekar-Cassels2025-04-291-1/+1
| | | | | I updated everything except rand, because the new version of rand interacts with #1903, thus requiring more care.
* Merge branch 'proto_enforce' into 'main'Nick Mathewson2025-04-224-26/+233
|\ | | | | | | | | | | | | Enforce recommended and required protocol versions in arti-client Closes #1849 and #1923 See merge request tpo/core/arti!2929
| * netdoc: Require serde feature from tor-protover.Nick Mathewson2025-04-161-1/+1
| |
| * netdoc: improve documentation for check_protocolsNick Mathewson2025-04-161-1/+7
| |
| * protover, *: Add documentation about what "supported" means.Nick Mathewson2025-04-161-1/+2
| |
| * Fix a pair of documentation links.Nick Mathewson2025-04-161-2/+2
| |
| * Add warnings about removing supported protocols.Nick Mathewson2025-04-161-0/+2
| |
| * Implement PartialEq for ProtoStatuses unconditionally.Nick Mathewson2025-04-161-4/+2
| |
| * protover,netdoc: Implement serde for Protocols etc.Nick Mathewson2025-04-162-3/+37
| |
| * netdoc: Put all ProtoStatuses into a single Arc<>d objectNick Mathewson2025-04-162-19/+55
| | | | | | | | | | We'll want this so that we can expose them before we expose the rest of the consensus (which we need to do for spec conformance).
| * netdoc: functionality for detecting missing subprotos.Nick Mathewson2025-04-161-2/+91
| | | | | | | | Also, add a new ErrorKind for this sort of error.
| * New functions to report supported subprotocolsNick Mathewson2025-04-161-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of #1849. Note that these functions are distributed across crates, so that if (in the future) we stop doing API breaks with every release, we will get the right outputs. Note also that these functions build the list of protocols out of specific symbolic features, rather than numbers: this makes it easier to avoid errors about "which feature was Relay=4 again", and easier to avoid accidentally referring to a protocol that doesn't exist, like "Consensus" (should be "Cons") or "HsDir" (case is wrong).
* | tor-netdoc: Joined OnceLock import with other std::sync importshashcatHitman2025-04-171-2/+1
| | | | | | | | Whoops! Missed that.
* | tor-netdoc: Replace OnceCell with OnceLockhashcatHitman2025-04-171-3/+3
|/ | | | - [`once_cell::sync::OnceCell`] has been replaced by [`std::sync::OnceLock`].
* tor-netdoc: use more idiomatic rustSteven Engler2025-04-031-2/+1
|
* tor-netdoc: fix `clippy::len_zero`Steven Engler2025-04-031-1/+1
| | | | | | | | | | | | | | | | | | ```text warning: length comparison to one --> crates/tor-netdoc/src/parse/tokenize.rs:470:12 | 470 | if args.len() >= 1 { | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!args.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero note: the lint level is defined here --> crates/tor-netdoc/src/lib.rs:9:9 | 9 | #![warn(clippy::all)] | ^^^^^^^^^^^ = note: `#[warn(clippy::len_zero)]` implied by `#[warn(clippy::all)]` ```
* Remove semver.md files post-release.Gabriela Moldovan2025-04-011-1/+0
|
* Bump all the unstable tor- and arti- crates to 0.29.0.Gabriela Moldovan2025-03-311-13/+13
| | | | | | | | | | Done using: ``` for crate in $(./maint/list_crates | rg '^(tor|arti-)'); do cargo set-version -p $crate 0.29.0 done ```
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-184-9/+9
| | | | - The Rng::gen() functions have been renamed to Rng::random().
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-182-2/+2
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | | | (Per discussion at #1774, we think the changes are acceptable.) This commit won't compile on its own; subsequent commits will fix it.
* Always use full path to rand::thread_rng().Nick Mathewson2025-03-181-2/+1
| | | | | This is partly for consistency, and partly to facilitate a global search-and-replace.
* Merge branch 'interface-abstraction-of-the-daleks' into 'main'Nick Mathewson2025-03-181-1/+0
|\ | | | | | | | | Wrap x25519-dalek and ed25519-dalek types. See merge request tpo/core/arti!2868
| * Wrap ed25519-dalek types.Nick Mathewson2025-03-181-1/+0
| | | | | | | | | | | | | | | | | | | | | | With this change, we'll no longer need to expose the types from dalek-cryptography as part of our API, and we'll have more freedom to switch ed25519 implementations, or to upgrade to a newer `rand` ahead of their schedule. Unlike with x25519-dalek, I had to tweak the API a bit: There's no way to get a &PublicKey out of a Keypair now, and implementing the old ed25519-dalek traits seemed unnecessary.
* | netdoc: Reject BOMs and NULs.Nick Mathewson2025-03-173-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | Per <https://spec.torproject.org/dir-spec/netdoc.html>, our netdocs never have a BOM, and never have internal NULs. This makes Arti reject such documents. For arguments on why it's okay to increase parser strictness, see the (forthcoming) proposal 356 at torspec!342, and see older discussion at torspec#296. Closes #1739.
* | netdoc: Make some parsing init functions fallible.Nick Mathewson2025-03-1710-38/+41
|/ | | | | | | 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-rtmock: task: Remove Default impl for ThreadDescriptorIan Jackson2025-03-041-1/+1
| | | | | | | | | This is going to become a hazard. Let's be explicit. This means using educe to derive the Default for Data. We also need to update our educe dependency to 0.4.22, since that's when Default(expression= "...") started working correctly.