aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-cell/src
Commit message (Collapse)AuthorAgeFilesLines
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-232-0/+2
|
* cell: Add accessors to IntroduceHandshakePayloadNick Mathewson2023-08-161-0/+15
|
* cell: Add accessors to Introduce2.Nick Mathewson2023-08-161-0/+17
|
* Merge branch 'more_introducing' into 'main'Nick Mathewson2023-08-162-3/+10
|\ | | | | | | | | Write more of IptEstablisher. See merge request tpo/core/arti!1510
| * cell: Add code to iterate over IntroEstablished extensionsNick Mathewson2023-08-151-1/+7
| |
| * cell, docs: Clarify what we mean by "Unrecognized".Nick Mathewson2023-08-151-2/+3
| |
* | Merge branch 'fix-weird-comment' into 'main'Ian Jackson2023-08-161-1/+1
|\ \ | |/ |/| | | | | doc: fix malformatted comment in SliceWriterError See merge request tpo/core/arti!1503
| * doc: fix malformatted comment in SliceWriterErrorEmil Engler2023-08-141-1/+1
| |
* | cell: make establish_intro accept impl<Into<HsMacKey>>Nick Mathewson2023-08-141-15/+14
|/ | | | | | | | | | | This allows us to allow passing in opaque HsMacKey objects, rather than untyped byte slices. Additionally, we now check both MAC and signature unconditionally, to avoid the large timing side-channel. The small timing side-channel of combining booleans with `&` is considered safe. Part of #993.
* Run add_warnings on all files.Nick Mathewson2023-08-041-2/+2
|
* Fix typosDimitris Apostolou2023-07-221-1/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-103-0/+3
|
* Run add_warning to remove `missing_panics_doc` deny.Nick Mathewson2023-07-061-1/+0
| | | | Closes #950.
* 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
|