Nick Mathewson
07e2ed0e5c
cell: Make Introduce2::new testing-only.
...
We never want to create one of these from its parts except when we
are testing it; we only want to forward an Introduce1 message with a
new command on it.
2023-05-17 16:22:35 -04:00
Nick Mathewson
c3c44cea67
cell: Record the text of an INTRODUCE2 header
...
We'll need to store this so that it can later on be used to complete
the hs_ntor handshake.
2023-05-17 16:22:35 -04:00
Nick Mathewson
a6ad49b22b
cell: extract introduce headers into a new type.
...
We'll want this because our hs_ntor handshake requires access to an
encoded version of the header independent from the actual encrypted
message.
part of #866 .
2023-05-17 11:06:28 -04:00
Nick Mathewson
6fa821238d
Revise all XXXXs from fixup-features
2023-05-15 11:00:28 -04:00
Nick Mathewson
4b08ef76a0
Run fixup-features _with_ annotations.
...
This litters our Cargo.toml files with "XXX" entries that we should
fix.
2023-05-15 10:41:32 -04:00
Nick Mathewson
e2e125fef7
Reformat Cargo.toml files.
2023-05-15 09:09:43 -04:00
Nick Mathewson
7a5373c110
Run fixup-features --no-annotate for initial Cargo.toml fixes.
...
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`.
2023-05-15 09:07:21 -04:00
Nick Mathewson
7ce808b75b
Change CircTarget::linkspecs() to return an encoded list.
...
If we didn't do this, we would need to transfrom
`EncodedLinkSpec`s into a `LinkSpec::Unrecognized`, which is not
semantically right. What's more, every user of this API wants to
consume encoded link specifiers, so encoding them early saves a
little effort.
2023-05-10 12:30:32 -04:00
Nick Mathewson
a86aff8399
linkspec: Make LinkSpecType public.
...
This lets us check the type of an `EncodedLinkSpec` as well, and
lets us remove an interface that took a raw u8.
2023-05-10 12:19:37 -04:00
Nick Mathewson
02785ca650
Rename UnparsedLinkSpec => EncodedLinkSpec
2023-05-10 11:23:39 -04:00
Nick Mathewson
e919ade062
Move responsibility for linkspec sorting to CircTarget.
...
This change is necessary so that we can build Extend2 messages
that have their LinkSpecs appear in a verbatim order as provided
in an INTRODUCE2 message or in a HS descriptor.
2023-05-10 11:00:57 -04:00
Nick Mathewson
1904cfc8b9
Increment crate versions.
...
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
```
2023-05-03 08:31:11 -04:00
Nick Mathewson
4efb423947
Upgrade our hex-literal dependency
2023-04-13 07:51:26 -04:00
Nick Mathewson
104d64589d
Increment MSRV to 1.65 in every crate.
2023-04-11 15:31:12 -04:00
Nick Mathewson
2ab5348ab2
Remove semver.md files.
2023-03-31 09:24:41 -04:00
Nick Mathewson
e208fb15ad
Bump crate versions that have breaking changes
...
These crates have had breaking changes. They are pre-1.0, so they get
a minor bump.
```
tor-basic-utils
tor-config
```
2023-03-31 08:28:06 -04:00
Nick Mathewson
a81ab391ae
Bump patchlevel on crates with non-breaking changes
...
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
```
2023-03-31 08:24:39 -04:00
Nick Mathewson
d6bb8fee0b
Upgrade to bitflags 2.0
...
This version of bitflags now requires us to explicitly list the
traits that we want to derive for our bit-flags structs.
2023-03-13 08:47:14 -04:00
Nick Mathewson
7da5d7a8d7
Serval rustdoc link fixes.
2023-03-08 14:21:33 -05:00
Nick Mathewson
2b9506ae67
intro_payload: various doc fixes and TODOs from review.
2023-03-08 12:27:05 -05:00
Nick Mathewson
5d5e8d8337
tor-cell: Be a little more pedantic about INTRODUCE cell types.
2023-03-08 09:50:11 -05:00
Nick Mathewson
028bf6d2bc
tor-cell: Better describe the parts of intro payload.
2023-03-08 09:41:22 -05:00
Nick Mathewson
1254a8b86e
tor-cell: Add code for the payload of an hs-ntor handshake.
...
(This is the encrypted information inside the INTRODUCE2 cell; it's
used by the client to tell the service where to find its rendezvous
point.)
2023-03-06 08:46:40 -05:00
Nick Mathewson
ee666fb0b7
Merge branch 'rename_rend_message' into 'main'
...
tor-cell: Rename Rendezvous*::message to handshake_info.
See merge request tpo/core/arti!1045
2023-03-01 18:04:00 +00:00
Nick Mathewson
07b1c3a505
tor-cell: Rename Rendezvous*::message to handshake_info.
...
Follow-up from !1038
2023-03-01 12:38:27 -05:00
Nick Mathewson
93a0b72105
tor-cell: Use a match when checking auth_key_type
2023-03-01 11:34:49 -05:00
Nick Mathewson
dbecdb53aa
tor_cell: Use nested readers and writers for EstablishIntro
2023-03-01 11:32:56 -05:00
Nick Mathewson
c8cc4a80c3
tor-cell: tweak comments on EstablishIntro members.
2023-03-01 11:27:45 -05:00
Nick Mathewson
5131703c22
Introduce a constant for the length of the output of hs_mac()
2023-03-01 11:26:35 -05:00
Nick Mathewson
03df452f7b
tor-cell: Rename EstablishIntro{Body => Details}
2023-03-01 11:18:50 -05:00
Nick Mathewson
53e44b58f5
tor-cell: Fix compilation for fuzzers
...
(I also ran them a couple billion iterations, and didn't hit
any bugs.)
2023-03-01 07:39:17 -05:00
Nick Mathewson
8c9a1a6fad
tor-cell: Make EstablishIntro do signatures
...
The old code parsed and encoded a signature and a mac... but there
was no way to actually set them properly. Now EstablishIntro is
built around an EstablishIntroBody, and has the ability to check
signatures and macs.
Because there is no way to handle one of these messages if we can't
check the signature, we no longer accept unrecognized `auth_key` types
in this message.
I've added a test to make sure that we can validate a message from the
C tor implementation, and a test to make sure we can validate our
own cells. I also had to modify the previous tests so that their
keys were well-formed.
2023-03-01 07:38:56 -05:00
Nick Mathewson
09d601d050
Change several cfgs to refer to new feature names.
2023-02-28 11:15:39 -05:00
Nick Mathewson
0c000a1713
Mark new tests as onion-service-only
2023-02-28 11:15:39 -05:00
Nick Mathewson
ca055d4cb5
tor-cell: Support extensions in INTRODUCE{1,2}
2023-02-28 11:15:39 -05:00
Nick Mathewson
7af2efdb82
tor-cell: Implement IntroduceAck and IntroEstablished
...
These are fairly simple, since the bulk of them is just an extension
list with no supported extensions.
2023-02-28 11:15:39 -05:00
Nick Mathewson
c302246e57
tor-cell: Implement rendezvous1 and rendezvous2.
2023-02-28 11:15:39 -05:00
Nick Mathewson
886faa96b3
Remove semver.md files now that 1.1.2 is out.
2023-02-28 10:06:41 -05:00
Nick Mathewson
f41449d0bd
Patchlevel bumps for remaining changed crates.
...
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
2023-02-28 07:13:27 -05:00
Nick Mathewson
3e1ae65212
Bump tor-units version for breaking change.
...
(The breaking change was removing `as_days()` from IntegerMinutes.)
We are _not_ calling this a downstream-api breaking change, per
discussion at
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1012?commit_id=bb2ab7c2a3e0994bb438188511688b5b039cae29#note_2876819
2023-02-28 07:10:00 -05:00
Nick Mathewson
4479d52a88
Bump patch-versions for breaking changes in tor-hs{crypto,client}
...
These are API breaks, but the crates themselves are currently
100% experimental, so there's no need to bump the minor versions
according to our semver rules.
2023-02-28 07:06:15 -05:00
Nick Mathewson
3e257a7cb5
Bump minor versions for significant breaking changes.
...
This includes tor-cell, tor-proto, and tor-netdir.
2023-02-28 07:05:15 -05:00
Ian Jackson
f63c7c48af
Rename onion-* cargo features to hs-* in tor-* crates
...
Fixes #756
2023-02-28 11:10:17 +00:00
Nick Mathewson
c1fbcb34f6
Rearrange cfg_attr in relaycell::msg
...
docsrs wants to find its `cfg_attr(docsrs...)` line after the
`cfg()` line.
2023-02-21 15:18:46 +00:00
Nick Mathewson
878531af90
Merge branch 'hs-cells-1' into 'main'
...
Start refactoring hs cell implementations
See merge request tpo/core/arti!1020
2023-02-16 15:36:31 +00:00
Nick Mathewson
c4b451ffa6
Mark a quoted block as text, so doctest ignores it.
2023-02-16 09:00:07 -05:00
Nick Mathewson
14417dc098
Add a TODO about combining several macros and patterns
2023-02-16 08:25:12 -05:00
Ian Jackson
b4e48b0695
Make a comment more accurate
2023-02-16 13:19:04 +00:00
Nick Mathewson
21db73f182
tor-cell: add a TODO comment about simplifying Body away.
2023-02-15 10:48:19 -05:00
Nick Mathewson
fce1c83f2e
tor-cell: Add another debug_assert to relay cell encoding
2023-02-15 10:48:19 -05:00