summaryrefslogtreecommitdiff
path: root/crates/tor-cell/src
Commit message (Collapse)AuthorAgeFilesLines
* lints: Run maint/add_warning to actually apply new lintsIan Jackson2023-06-211-0/+2
|
* tor-cell: Downgrade 2 TODO-HS to TODO-HSSNick Mathewson2023-06-162-2/+2
|
* tor-cell: HasRetryTime for IntroduceAckStatus: Confirm re CANT_RELAY (fmt)Ian Jackson2023-06-141-1/+1
| | | | | rustdoc insisted on misindenting this before, and now it insists on un-mis-indenting it.
* tor-cell: HasRetryTime for IntroduceAckStatus: Confirm re CANT_RELAYIan Jackson2023-06-141-1/+1
| | | | | Remove this todo as per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1246#note_2912104
* tor-cell: Add a doc comment for impl tor_error::HasRetryTime for ↵Ian Jackson2023-06-141-0/+4
| | | | IntroduceAckStatus
* tor-cell: impl HasRetryTime for IntroduceAckStatusIan Jackson2023-06-141-0/+14
|
* Merge branch 'tor-cell-todos' into 'main'Nick Mathewson2023-06-136-53/+9
|\ | | | | | | | | Resolve most TODO HS comments in tor-cell See merge request tpo/core/arti!1245
| * cell: Downgrade a couple more TODO HS comments.Nick Mathewson2023-06-132-3/+3
| |
| * cell: Remove relaycell::restrictNick Mathewson2023-06-132-35/+0
| | | | | | | | | | This module didn't have anything in it; nonetheless, removing it does count as an API break since it was public.
| * cell: Remove some TODOsNick Mathewson2023-06-133-10/+2
| | | | | | | | | | Yes, we still will need more accessors for onion services, but we can add them as we find the need.
| * cell: remove/localize "allow(dead-code)"Nick Mathewson2023-06-133-5/+4
| |
* | tor-cell: IntroduceAck: Add .success() function to give a ResultIan Jackson2023-06-131-0/+16
|/ | | | | | The type is a bit odd but this is a result of the underlying protocol. I don't feel like inventing `IntroduceAckSuccess` that contains only the extensions.
* proto: Convert MsgHandler API to expect a message, not a cell.Nick Mathewson2023-06-122-1/+19
| | | | Closes #887.
* cell: Add an accessor for the body of a Rendezvous2.Nick Mathewson2023-06-121-0/+6
|
* tor-cell: remove use of arrayrefNick Mathewson2023-06-012-6/+16
| | | | Closes #872
* cell: Make EstablishRendezvous contain a RendCookie.Nick Mathewson2023-05-231-5/+2
|
* cell: Make Introduce2::new testing-only.Nick Mathewson2023-05-171-1/+6
| | | | | | 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.
* cell: Record the text of an INTRODUCE2 headerNick Mathewson2023-05-171-9/+39
| | | | | We'll need to store this so that it can later on be used to complete the hs_ntor handshake.
* cell: extract introduce headers into a new type.Nick Mathewson2023-05-171-20/+42
| | | | | | | | 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.
* Change CircTarget::linkspecs() to return an encoded list.Nick Mathewson2023-05-101-3/+3
| | | | | | | | 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.
* Rename UnparsedLinkSpec => EncodedLinkSpecNick Mathewson2023-05-101-3/+3
|
* Move responsibility for linkspec sorting to CircTarget.Nick Mathewson2023-05-101-3/+1
| | | | | | 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.
* Upgrade to bitflags 2.0Nick Mathewson2023-03-131-0/+1
| | | | | This version of bitflags now requires us to explicitly list the traits that we want to derive for our bit-flags structs.
* Serval rustdoc link fixes.Nick Mathewson2023-03-081-2/+2
|
* intro_payload: various doc fixes and TODOs from review.Nick Mathewson2023-03-081-4/+16
|
* tor-cell: Be a little more pedantic about INTRODUCE cell types.Nick Mathewson2023-03-081-3/+3
|
* tor-cell: Better describe the parts of intro payload.Nick Mathewson2023-03-081-3/+23
|
* tor-cell: Add code for the payload of an hs-ntor handshake.Nick Mathewson2023-03-062-0/+143
| | | | | | (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.)
* Merge branch 'rename_rend_message' into 'main'Nick Mathewson2023-03-011-15/+18
|\ | | | | | | | | tor-cell: Rename Rendezvous*::message to handshake_info. See merge request tpo/core/arti!1045
| * tor-cell: Rename Rendezvous*::message to handshake_info.Nick Mathewson2023-03-011-15/+18
| | | | | | | | Follow-up from !1038
* | tor-cell: Use a match when checking auth_key_typeNick Mathewson2023-03-011-6/+8
| |
* | tor_cell: Use nested readers and writers for EstablishIntroNick Mathewson2023-03-011-18/+12
| |
* | tor-cell: tweak comments on EstablishIntro members.Nick Mathewson2023-03-011-2/+2
| |
* | Introduce a constant for the length of the output of hs_mac()Nick Mathewson2023-03-011-3/+3
| |
* | tor-cell: Rename EstablishIntro{Body => Details}Nick Mathewson2023-03-011-8/+8
| |
* | tor-cell: Make EstablishIntro do signaturesNick Mathewson2023-03-011-38/+229
|/ | | | | | | | | | | | | | | | 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.
* Change several cfgs to refer to new feature names.Nick Mathewson2023-02-282-13/+13
|
* tor-cell: Support extensions in INTRODUCE{1,2}Nick Mathewson2023-02-281-10/+22
|
* tor-cell: Implement IntroduceAck and IntroEstablishedNick Mathewson2023-02-281-19/+85
| | | | | These are fairly simple, since the bulk of them is just an extension list with no supported extensions.
* tor-cell: Implement rendezvous1 and rendezvous2.Nick Mathewson2023-02-281-4/+38
|
* Rename onion-* cargo features to hs-* in tor-* cratesIan Jackson2023-02-282-13/+13
| | | | Fixes #756
* Rearrange cfg_attr in relaycell::msgNick Mathewson2023-02-211-2/+2
| | | | | docsrs wants to find its `cfg_attr(docsrs...)` line after the `cfg()` line.
* Merge branch 'hs-cells-1' into 'main'Nick Mathewson2023-02-166-464/+671
|\ | | | | | | | | Start refactoring hs cell implementations See merge request tpo/core/arti!1020
| * Mark a quoted block as text, so doctest ignores it.Nick Mathewson2023-02-161-1/+1
| |
| * Add a TODO about combining several macros and patternsNick Mathewson2023-02-161-0/+4
| |
| * Make a comment more accurateIan Jackson2023-02-161-1/+3
| |
| * tor-cell: Use a more generic mechanism for managing extensionsNick Mathewson2023-02-153-56/+249
| | | | | | | | | | | | | | | | | | | | Several HS message types have an extension list type. They all use the same framing for extensions, but each of them has separate extension types and separate extension namespaces. This commit simplifies establish_intro a little, and adds support for maintaining unrecognized extension types--at the expense of some new internal code.
| * tor-cell: Extract establish-intro into its own module.Nick Mathewson2023-02-153-214/+222
| | | | | | | | | | | | | | Some of the HS message types have a lot of dependent types, like extensions and options for those extensions, and so on. Except when those extensions are portable across cell types, it makes sense to put them in their own modules.
| * tor-cell: rename onion_service module to hsNick Mathewson2023-02-153-3/+3
| |
* | tor-cell: add a TODO comment about simplifying Body away.Nick Mathewson2023-02-152-0/+8
| |