summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
...
| * netdoc: Correct and test some tricky routerdesc errorsNick Mathewson2022-11-175-2/+247
| | | | | | | | These required hex-editing identity certificates :P
| * netdoc: Add tests for routerdesc accessors.Nick Mathewson2022-11-171-1/+31
| |
| * Netdoc: use a different desc in tests.Nick Mathewson2022-11-172-34/+37
| | | | | | | | This is from Akka, which ahf runs.
* | Fix a couple of rustdoc issues.Nick Mathewson2022-11-181-2/+2
| | | | | | | | These slipped in while nightly was broken.
* | Fix a bunch of "needless borrow" warnings on nightlyNick Mathewson2022-11-181-1/+1
|/ | | | | It looks like, despite a few false starts, they've got this warning right; there weren't any false positives.
* Merge branch 'real_netdoc_pos' into 'main'Ian Jackson2022-11-162-21/+15
|\ | | | | | | | | | | | | Replace `Option<Pos>` with `Pos` in `ParseError`. Closes #640 See merge request tpo/core/arti!859
| * Replace `Option<Pos>` with `Pos` in `ParseError`.Nick Mathewson2022-11-152-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have `Pos::Unknown` for an error at an unknown location and `Pos::None` for an error where no location is sensible. There's no reason to have an additional `Option` here. Additionally, the use of `Option` gave us a bug where our old `ParseError::at_pos()` method didn't actually set the position unless the position was already set. That's not what we want! Fixes #640. Finally, we have to fix a test that was a bit broken because it was working around #640.
* | Remove a `TODO pt-client` in netdoc.Nick Mathewson2022-11-151-2/+0
|/ | | | This issue is now torspec!94.
* Resolve a dead-code warning.Nick Mathewson2022-11-151-0/+1
|
* netdoc: Allow empty lines at the end of a router descriptor.Nick Mathewson2022-11-152-3/+34
|
* tor-netdoc: Add a new ErrorKind for EmptyLine.Nick Mathewson2022-11-153-2/+8
| | | | | Empty lines were previously reported as BadKeyword, which is confusing.
* Merge branch 'guardmgr-todo-misc' into 'main'Nick Mathewson2022-11-102-0/+11
|\ | | | | | | | | Resolve most "TODO pt-client" comments in GuardMgr See merge request tpo/core/arti!840
| * RouterDesc: Add an or_ports method.Nick Mathewson2022-11-102-0/+11
| |
* | Upgrade to serde_with 2, phf 0.11. Closes #526.Nick Mathewson2022-11-101-2/+2
| |
* | Upgrade to tinystr 0.7. Closes #591.Nick Mathewson2022-11-101-1/+1
| |
* | bump rust-version to 1.60 in every crate.Nick Mathewson2022-11-101-1/+1
|/
* Merge branch 'store-yak-misc' into 'main'eta2022-11-081-0/+5
|\ | | | | | | | | Small misc yaks for bridge descriptor persistence See merge request tpo/core/arti!828
| * tor-netdoc: RouterDesc: Add published accessorIan Jackson2022-11-041-0/+5
| | | | | | | | The bridge descriptor manager is going to want this.
* | Fix typosDimitris Apostolou2022-11-062-2/+2
|/
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* Merge branch 'edition-2021' into 'main'eta2022-11-031-1/+1
|\ | | | | | | | | set all crate edition to 2021 See merge request tpo/core/arti!822
| * set all crate edition to 2021trinity-1686a2022-11-011-1/+1
| |
* | Require derive_more 0.99.3Ian Jackson2022-11-031-1/+1
|/ | | | | | | | 0.99.[012] have a bug https://github.com/JelteF/derive_more/issues/114 which makes the Deref derive for bridgedesc::StateGuard not work and therefore breaks minimal-versions CI. It seems simpler to require the newer version everywhere.
* Fix some rustdoc errors.Nick Mathewson2022-10-131-2/+2
| | | | | | In addition to the usual "You named that method wrong!" errors, we have a new rustdoc error that complains about bogus "HTML tags" that are actually unquoted usage of types like `Result<Foo>`.
* cargo fmt to remove blank linesIan Jackson2022-10-121-1/+0
| | | | | | | Apparently cargo fmt doesn't like these, which my perl rune didn't delete. This commit is precisely the result of `cargo fmt`.
* Replace all README copies in src/lib.rs with includesIan Jackson2022-10-121-51/+1
| | | | | | | | The feature we want is `#[doc = include_str!("README.md")]`, which is stable since 1.54 and our MSRV is now 1.56. This commit is precisely the result of the following Perl rune: perl -i~ -0777 -pe 's{(^//!(?!.*\@\@).*\n)+}{#![doc = include_str!("../README.md")]\n}m' crates/*/src/lib.rs
* netdoc: Add accessors for protocols and ntor key.Nick Mathewson2022-10-041-0/+11
| | | | | These are needed to actually be able to build circuits through a bridge.
* tor-netdoc: Add relay ID accessors for RouterDesc.Nick Mathewson2022-10-042-7/+27
| | | | | | | | | To implement a reasonable RsaIdentity accessor, we have to store the RsaIdentity in the RouterDesc, or else we'd have to recalculate it using SHA1 and DER every time. The Ed25519 identity is hidden inside the identity cert, but it's safe to get a reference to it.
* Upgrade all fuzzers to newer libfuzzer-sys version.Nick Mathewson2022-10-031-1/+1
|
* Remove semver.md files now that arti 1.0.1 is out.Nick Mathewson2022-10-031-2/+0
|
* Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-2/+2
|
* Work around a new nightly clippy warningNick Mathewson2022-09-303-17/+22
| | | | | | | | | | | | | | The warning `clippy::bool_to_int_with_if` is meant to shout at you when you say `if x { 1 } else { 0 }` and instead suggest that you say `inttype::from(x)`. I agreed with this for the case in tor-cert, where we are literally converting a boolean into a flag. I don't agree with this in tor-netdoc, where we are using a boolean to decide how many fields to skip in a given document format. So for this case, I decided to clean up the code a little by renaming "skip" to "n_skip", and changing the boolean to use an enum instead.
* Make RouterDesc implement Clone and Debug.Nick Mathewson2022-09-262-0/+3
| | | | Their omission was an oversight.
* Bump crate versions in preparation for Arti 1.0.0 release.Nick Mathewson2022-09-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because we want to work more on ensuring that our semver stability story is solid, we are _not_ bumping arti-client to 1.0.0 right now. Here are the bumps we _are_ doing. Crates with "minor" bumps have had API breaks; crates with "patch" bumps have had new APIs added. Note that `tor-congestion` is not bumped here: it's a new crate, and hasn't been published before. ``` tor-basic-utils minor fs-mistrust minor tor-config minor tor-rtcompat minor tor-rtmock minor tor-llcrypto patch tor-bytes patch tor-linkspec minor tor-cell minor tor-proto minor tor-netdoc patch tor-netdir minor tor-persist patch tor-chanmgr minor tor-guardmgr minor tor-circmgr minor tor-dirmgr minor arti-client minor arti-hyper minor arti major arti-bench minor arti-testing minor ```
* add feature annotation to fields made visible through visible::StructFieldstrinity-1686a2022-08-245-0/+69
|
* add feature annotation not added by doc_auto_cfgtrinity-1686a2022-08-246-1/+7
|
* enable doc_auto_cfg feature on every crate when documenting for docs.rstrinity-1686a2022-08-242-0/+4
|
* tor-netdoc: NetParams: impl FromIteratorIan Jackson2022-08-161-0/+8
| | | | | Otherwise a caller who has a set of parameters must open-code the loop.
* Bump patch versions on crates that have new APIs.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | Do _not_ bump the dependency versions on crates that have had no changes since arti 0.0.5, since those crates do not depend on the new APIs. ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p tor-llcrypto --bump patch git restore crates/tor-checkable git restore crates/tor-consdiff git restore crates/tor-rtmock ```
* Bump minor version on crates with deps with breaking changes.Nick Mathewson2022-08-011-1/+1
| | | | | | | | | | | | | | | This performs the transitive closure of the last operation: everything that depends on a crate with a breaking change gets the version which it depends on bumped. ``` cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor cargo set-version -p tor-config --bump minor ```
* Bump minor versions on all crates that have had breaking changes.Nick Mathewson2022-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | Done with these commands: ``` cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-cert --bump minor cargo set-version -p tor-linkspec --bump minor cargo set-version -p tor-cell --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump minor cargo set-version -p tor-dirclient --bump minor cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti --bump minor ```
* fix nighly clippytrinity-1686a2022-07-232-6/+2
|
* change usage of PublicKey to Ed25519 in tor-certtrinity-1686a2022-07-232-9/+11
| | | | and propagate to other affected crates
* change check_key to take a Option<&_> instead of &Option<_>trinity-1686a2022-07-231-2/+2
|
* Also downgrade serde_with: Version 2.0 requires Rust 1.60Nick Mathewson2022-07-201-1/+1
|
* Downgrade phf back to 0.10Nick Mathewson2022-07-201-1/+1
| | | | | It turns out that phf 0.11 depends on Rust 1.60, which is above our MSRV.
* Upgrade to latest phf, serde_with, serial_test.Nick Mathewson2022-07-191-2/+2
|
* Fix clippy needless derefIan Jackson2022-07-061-3/+3
|
* tor-netdoc: b64 tests: add exhaustive roundtrip testIan Jackson2022-07-062-0/+43
|
* Bump `base64ct` crate `1.5.0` -> `1.5.1`Arturo Marquez2022-06-272-19/+7
| | | | | | This new release checks for invalid symbols in non-padded inputs for decoding. Therefore, we can get rid of the logic implemented in `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600`