summaryrefslogtreecommitdiff
path: root/crates/tor-netdoc
Commit message (Collapse)AuthorAgeFilesLines
* 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`
* Remove semver.md files now that 0.5.0 is outNick Mathewson2022-06-241-2/+0
|
* Bump crate and dependency versions.Nick Mathewson2022-06-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were done with the following commands: ``` cargo set-version -p tor-basic-utils --bump patch cargo set-version -p fs-mistrust --bump minor cargo set-version -p tor-error --bump patch cargo set-version -p tor-config --bump patch cargo set-version -p tor-units --bump patch cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-llcrypto --bump patch 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-cell --bump minor cargo set-version -p tor-proto --bump minor cargo set-version -p tor-netdoc --bump patch cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-persist --bump patch cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-guardmgr --bump minor cargo set-version -p tor-circmgr --bump patch cargo set-version -p tor-dirclient --bump patch cargo set-version -p tor-dirmgr --bump minor cargo set-version -p arti-client --bump patch cargo set-version -p arti --bump minor cargo set-version -p arti-bench --bump minor cargo set-version -p arti-testing --bump minor ```
* Merge branch 'clippy' into 'main'Ian Jackson2022-06-241-0/+3
|\ | | | | | | | | Fix clippy nightly again See merge request tpo/core/arti!603
| * Run maint/add_warning crates/*/src/{lib,main}.rsIan Jackson2022-06-231-0/+3
| | | | | | | | Update all lint blocks
* | Merge branch 'error_cleanup_2' into 'main'eta2022-06-242-5/+18
|\ \ | | | | | | | | | | | | Error refactoring: bytes, cert, proto. See merge request tpo/core/arti!604
| * | tor-proto: split and elaborate tor_bytes::Error instancesNick Mathewson2022-06-232-5/+18
| |/ | | | | | | | | | | | | | | | | Some of these were for decoding particular objects (we now say what kind of objects), and some were unrelated tor_cert errors that for some reason we had shoved into a tor_bytes::Error. There is now a separate tor_cert::CertError type, independent from tor_cert's use of `tor_bytes::Error` for parsing errors.
* | base64: Move some tests into a separate function, placating clippyIan Jackson2022-06-231-11/+15
| |
* | base64: Add yet more test casesIan Jackson2022-06-231-0/+17
| |
* | Add some more test cases for base64Arturo Marquez2022-06-221-0/+17
| | | | | | | | | | These tests are borrowed from other parts of the `tor-netdoc` crate.
* | Improve base64 testsArturo Marquez2022-06-221-1/+13
| | | | | | | | Request for changes: `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600#note_2816252`
* | Add link to upstream issueArturo Marquez2022-06-221-1/+3
| | | | | | | | As per request, here: `https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/600#note_2816252`
* | Remove unused `base64` crateArturo Marquez2022-06-211-1/+0
| |
* | Replace `base64` crate with `base64ct` crateArturo Marquez2022-06-213-7/+25
|/ | | | | | | Note: the `base64ct` crate rejects invalid characters when the decoding is done on padded strings. However, the `FromStr` impl for `B64` can have both padded **and** unpadded inputs, so all inputs are now padded first, before decoding.
* Add a configuration option for reachable_addrsNick Mathewson2022-06-171-0/+8
| | | | (This doesn't do anything yet.)
* NetDoc: Make AddrPortPattern implement serde traitsNick Mathewson2022-06-173-2/+33
| | | | | | I'm using serde_with here to just re-use the Display and FromStr implementations, since those are what has proven easier to type in the past.
* Make AddrPortPattern and friends implement Eq and PartialEqNick Mathewson2022-06-172-2/+3
|
* Merge branch 'high-level-features' into 'main'Nick Mathewson2022-06-161-0/+3
|\ | | | | | | | | | | | | Add "full" and "experimental" features to arti, arti-client, and below. Closes #499 See merge request tpo/core/arti!584
| * Add "full" and "experimental" features to arti-client and below.Nick Mathewson2022-06-101-0/+3
| | | | | | | | | | | | | | | | | | The "full" feature is a catch-all for all features, _except_: * Those that select a particular implementation (like tor-llcrypto/with-openssl) or build flag (like "static") * Those that are experimental or unstable (like "experimental-api") * Those that are testing-only.
* | Add one more "allow" to tor_netdoc::parse::macros.Nick Mathewson2022-06-151-0/+1
|/ | | | | Without this, clippy is error-free, but `cargo test` somehow gives a warning.
* Netdoc tests: extract decode-base64-ignore-ws code.Nick Mathewson2022-06-071-10/+13
|
* microdesc: make sure we recover from an error in the final md.Nick Mathewson2022-06-071-1/+7
| | | | | | | | (This is slightly different from recovering from errors in the middle of a list of mds, since in this case we _can't_ advance to the next md.) Also, note that a given branch is probably not reachable.
* netdoc: test case for microdesc with no ed25519 id.Nick Mathewson2022-06-072-0/+9
| | | | | The "bad-id" microdescriptor is hand-edited based on one from a Chutney network.
* netdoc: test a couple of accessors for AuthCert.Nick Mathewson2022-06-071-1/+11
|
* Netdoc: test enforcement for items that mustn't take objects.Nick Mathewson2022-06-071-0/+6
| | | | Found via coverage.
* netdoc: remove an unused method.Nick Mathewson2022-06-071-12/+0
|
* netdoc: Test more accessors for tokenized documents.Nick Mathewson2022-06-072-4/+20
|
* Netdoc: add accessor to error for ParseErrorKindNick Mathewson2022-06-071-0/+5
| | | | | The kind type was already public, but we didn't give the user any way to get it.
* netdoc: tests for parsing UnvalidatedEdCert.Nick Mathewson2022-06-071-1/+47
|
* Tests for netdoc RsaPublic type.Nick Mathewson2022-06-071-2/+37
|
* Fix a copy-paste error in Ed25519 parsing tests.Nick Mathewson2022-06-011-3/+3
| | | | | We accidentally tried to validate (invalid) ed25519 keys as curve25519 keys.