aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-bytes
Commit message (Collapse)AuthorAgeFilesLines
* Remove semver.md now that 1.1.8 is out.Nick Mathewson2023-09-051-1/+0
|
* Update patchlevel for crates with nontrivial changes.Nick Mathewson2023-09-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are: ``` hashx equix tor-async-utils tor-error tor-config tor-rtmock tor-llcrypto tor-bytes tor-hscrypto tor-hspow tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-netdir tor-chanmgr tor-guardmgr tor-dirmgr tor-keymgr tor-hsclient tor-hsservice arti-client arti ```
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-232-0/+2
|
* tor-bytes: deprecate always_bug with From traitEmil Engler2023-08-172-0/+12
| | | | | | This commit deprecates the `EncodeError::always_bug` function with a `From<EncodeError> for Bug` trait, which is a more semantically correct way to perform this action.
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Bump patchlevel versions of crates with trivial changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had trivial changes only: typically, changes to documentation or to clippy warnings. There's no good reason to update which version of them other crates depend on, so we only bump _their_ patchlevels. ``` tor-async-utils caret safelog tor-events tor-units tor-rtcompat tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-socksproto tor-cert tor-cell tor-consdiff tor-congestion arti-rpcserver arti-testing arti-bench arti-config arti-hyper ```
* Increment patchlevel versions of crates with minor changesNick Mathewson2023-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates are at version 0.x.y, so we don't need to distinguish new-feature changes from other changes: ``` tor-basic-utils fs-mistrust tor-error tor-geoip tor-checkable tor-linkspec tor-netdoc tor-netdir tor-persist tor-ptmgr tor-hsservice ``` This crate has a breaking change, but only when the semver-breaking feature `experimental-api` is enabled: ``` tor-config ``` This crate is at version 1.x.y, but has no new public APIs, and therefore does not need a minor version bump: ``` arti ```
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-102-0/+3
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* Bump patchlevel versions on crates with smaller changesNick Mathewson2023-06-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done with the commands below. The following crates have had various changes, and should get a patchlevel bump. Since they are pre-1.0, we do not need to distinguish new APIs from other changes. ``` cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p safelog cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-circmgr cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p tor-linkspec cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-netdoc cargo set-version --bump patch -p tor-proto cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-socksproto ``` This crate has new features, but no new non-experimental Rust APIs. So even though it is post-1.0, it gets a patchlevel bump. ``` cargo set-version --bump patch -p arti ```
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* Merge branch 'remove_arrayref' into 'main'Nick Mathewson2023-06-064-20/+16
|\ | | | | | | | | | | | | Remove use of arrayref Closes #872 See merge request tpo/core/arti!1214
| * tor-bytes: Remove use of arrayrefNick Mathewson2023-05-254-20/+16
| | | | | | | | | | Part of #872: Now that const generics are in, we have better ways to express converting slices into array-references.
* | Bump crate versions in preparation for v1.1.5 release.Nick Mathewson2023-06-011-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated with the following commands: ``` cargo set-version --bump minor -p tor-cell cargo set-version --bump minor -p tor-linkspec cargo set-version --bump minor -p tor-proto cargo set-version --bump minor -p tor-netdoc cargo set-version --bump minor -p tor-circmgr cargo set-version --bump patch -p tor-cert cargo set-version --bump patch -p tor-basic-utils cargo set-version --bump patch -p tor-rpcbase cargo set-version --bump patch -p tor-llcrypto cargo set-version --bump patch -p tor-hscrypto cargo set-version --bump patch -p tor-checkable cargo set-version --bump patch -p tor-async-utils cargo set-version --bump patch -p caret cargo set-version --bump patch -p fs-mistrust cargo set-version --bump patch -p safelog cargo set-version --bump patch -p retry-error cargo set-version --bump patch -p tor-error cargo set-version --bump patch -p tor-config cargo set-version --bump patch -p tor-events cargo set-version --bump patch -p tor-units cargo set-version --bump patch -p tor-rtcompat cargo set-version --bump patch -p tor-rtmock cargo set-version --bump patch -p tor-protover cargo set-version --bump patch -p tor-bytes cargo set-version --bump patch -p tor-socksproto cargo set-version --bump patch -p tor-consdiff cargo set-version --bump patch -p tor-netdir cargo set-version --bump patch -p tor-congestion cargo set-version --bump patch -p tor-persist cargo set-version --bump patch -p tor-chanmgr cargo set-version --bump patch -p tor-ptmgr cargo set-version --bump patch -p tor-guardmgr cargo set-version --bump patch -p tor-dirclient cargo set-version --bump patch -p tor-dirmgr cargo set-version --bump patch -p tor-hsclient cargo set-version --bump patch -p tor-hsservice cargo set-version --bump patch -p arti-client cargo set-version --bump patch -p arti-rpcserver cargo set-version --bump patch -p arti-config cargo set-version --bump patch -p arti-hyper cargo set-version --bump patch -p arti cargo set-version --bump patch -p arti-bench cargo set-version --bump patch -p arti-testing ```
* Run fixup-features --no-annotate for initial Cargo.toml fixes.Nick Mathewson2023-05-151-0/+3
| | | | | | | | | This does the following: - Gives every crate a `full`. - Cause every `full` to depend on `full` from the lower-level crates. - Makes every feature listed _directly_ in `experimental` depend on `__is_experimental`.
* Increment crate versions.Nick Mathewson2023-05-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of the errorkind bumps, we're calling this a breaking change in everything lower-level than `arti`. Generated with: ``` cargo set-version -p tor-basic-utils --bump minor cargo set-version -p tor-async-utils --bump minor cargo set-version -p caret --bump minor cargo set-version -p fs-mistrust --bump minor cargo set-version -p safelog --bump minor cargo set-version -p retry-error --bump minor cargo set-version -p tor-error --bump minor cargo set-version -p tor-config --bump minor cargo set-version -p tor-events --bump minor cargo set-version -p tor-units --bump minor cargo set-version -p tor-rtcompat --bump minor cargo set-version -p tor-rtmock --bump minor cargo set-version -p tor-rpcbase --bump minor cargo set-version -p tor-llcrypto --bump minor cargo set-version -p tor-protover --bump minor cargo set-version -p tor-bytes --bump minor cargo set-version -p tor-hscrypto --bump minor cargo set-version -p tor-socksproto --bump minor cargo set-version -p tor-checkable --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-proto --bump minor cargo set-version -p tor-netdoc --bump minor cargo set-version -p tor-consdiff --bump minor cargo set-version -p tor-netdir --bump minor cargo set-version -p tor-congestion --bump minor cargo set-version -p tor-persist --bump minor cargo set-version -p tor-chanmgr --bump minor cargo set-version -p tor-ptmgr --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 tor-hsclient --bump minor cargo set-version -p tor-hsservice --bump minor cargo set-version -p arti-client --bump minor cargo set-version -p arti-rpcserver --bump minor cargo set-version -p arti-config --bump minor cargo set-version -p arti-hyper --bump minor cargo set-version -p arti --bump patch cargo set-version -p arti-bench --bump patch cargo set-version -p arti-testing --bump patch ```
* Upgrade our hex-literal dependencyNick Mathewson2023-04-131-1/+1
|
* Increment MSRV to 1.65 in every crate.Nick Mathewson2023-04-111-1/+1
|
* Remove semver.md files.Nick Mathewson2023-03-311-2/+0
|
* Bump patchlevel on crates with non-breaking changesNick Mathewson2023-03-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For these crates, the changes are nontrivial, so we _do_ bump the versions on which their dependent crates depend. Fortunately, since they are all pre-1.0, we don't need to distinguish semver-additions from other changes. (Except for arti, which _is_ post-1.0, but gets a patchlevel bump anyway.) These are unstable crates with breaking changes: ``` tor-hscrypto tor-hsclient ``` These have new or extended APIs: ``` safelog tor-bytes tor-cell tor-linkspec tor-llcrypto tor-proto tor-cert arti-client ``` These have new unstable APIs or features: ``` tor-netdoc tor-circmgr (also broke some unstable APIs) arti (is post-1.0) ``` These have bugfixes only: ``` caret tor-dirmgr ```
* Serval rustdoc link fixes.Nick Mathewson2023-03-081-1/+1
|
* tor-bytes: Add take_rest and read_nested_* to fuzzer.Nick Mathewson2023-03-061-0/+25
|
* tor-bytes: defend against misuse of extract_n().Nick Mathewson2023-03-061-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | Previously, if somebody wrote this code, an attacker could easily use it to cause an OOM panic: ``` let n = r.take_u64(); let items: Vec<Foo> = r.extract_n(n as usize)?; ``` The first line of defense here is not to write protocols like that: we don't actually _have_ any 32-bit counters in our protocol AFAICT. The second line of defense is to pre-check `n` for reasonableness before calling `extract_n`. Here we add a third line of defense: whereas previously we would do `Vec::with_capacity(n)` in `extract_n`, we now allocate an initial capacity of `min(n, r.remaining())`. This ensures that the size of the allocation can't exceed the remaining length of the message, which (for our cell types at least) should prevent it from overflowing or running OOM.
* tor-bytes: Clarify that Cursor is not a good thing, and could be neater.Nick Mathewson2023-03-011-2/+11
|
* clarify results of misusing cursorsIan Jackson2023-03-011-2/+2
|
* tor-bytes: impl Readable and Writeable for CtByteArray.Nick Mathewson2023-02-282-0/+19
|
* tor-bytes: Add cursor functionality to ReaderNick Mathewson2023-02-282-0/+62
| | | | | We'll use this to implement signature and MAC checking for EstablishIntro cells.
* Remove semver.md files now that 1.1.2 is out.Nick Mathewson2023-02-281-1/+0
|
* Patchlevel bumps for remaining changed crates.Nick Mathewson2023-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have had small code changes, but no API additions: tor-config tor-socksproto tor-cert tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr arti tor-hsservice tor-congestion These crates have had API extensions: fs-mistrust tor-llcrypto tor-bytes tor-checkable tor-linkspec tor-netdoc tor-persist arti-client
* Change tor_bytes::Error::BadMessage to a Cow.Nick Mathewson2023-02-093-2/+12
| | | | | | | | | | Actually, to avoid making a breaking change, I'm deprecating BadMessage and creating a new InvalidMessage variant that takes a Cow. This way I don't need to track every crate that re-exposes tor_bytes::Error and call this a breaking change in those. Making this change will allow tor_bytes errors to be much more helpful.
* Remove semver.md files now that 1.1.1 is tagged.Nick Mathewson2023-02-011-2/+0
|
* Bump the patch version of every crate that had API additionsNick Mathewson2023-02-011-3/+3
| | | | | | These crates had API or behavior changes that may affect downstream crates. Fortunately, they're all version 0.x, and don't need minor bumps for this.
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-272-0/+2
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* Disable clippy::unlinlined-format-argsNick Mathewson2023-01-271-0/+1
| | | | | | | | This warning kind of snuck up on us! (See #748) For now, let's disable it. (I've cleaned it up in a couple of examples, since those are meant to be more idiomatic and user-facing.) Closes #748.
* tor-bytes: impl Writeable for &impl WriteableIan Jackson2023-01-242-0/+7
|
* tor-bytes: Implement conversion from EncodeError to BugIan Jackson2023-01-242-1/+17
|
* Do not .gitignore crates/*/fuzz/corpusIan Jackson2023-01-201-1/+0
| | | | | These are symlinks which are actually checked in. They should not be ignored. (This caused trouble for some of my privsep tooling...)
* Merge branch 'test-lints' into 'main'eta2023-01-062-0/+18
|\ | | | | | | | | Add test lint blocks to all "mod test" See merge request tpo/core/arti!937
| * test lint blocks: Add many many automaticallyIan Jackson2022-12-122-0/+18
| | | | | | | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* | doc: consistent summary line for the READMEsEmil Engler2022-12-201-1/+1
|/ | | | | This commit introduces a consistency to the summary line of all README.md files in each and every crate.
* Bump the minor version of every crate.Nick Mathewson2022-11-301-3/+3
| | | | | We made this job easy this time around: by incrementing our MSRV, we have forced ourselves to do at least a minor bump everywhere.
* bump rust-version to 1.60 in every crate.Nick Mathewson2022-11-101-1/+1
|
* Run add_warnings.Nick Mathewson2022-11-031-0/+1
|
* set all crate edition to 2021trinity-1686a2022-11-011-1/+1
|
* tor-bytes: Avoid redundant allocationEmil Engler2022-10-251-1/+1
| | | | See c489e1d9118edd842f80b76a636037524a45ee45
* Fix some rustdoc errors.Nick Mathewson2022-10-134-10/+7
| | | | | | 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-48/+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
* Upgrade all fuzzers to newer libfuzzer-sys version.Nick Mathewson2022-10-031-1/+1
|
* Bump crates that have had backward compatible API changes.Nick Mathewson2022-10-031-1/+1
|