Nick Mathewson
74ef8de86f
Merge branch 'doc-iter' into 'main'
...
Introduce new batching iterator and use it in two places
See merge request tpo/core/arti!1016
2023-02-13 18:59:42 +00:00
Ian Jackson
297019bb23
batching_split_before: Whitespace error fix
2023-02-13 17:34:04 +00:00
Ian Jackson
b4d0b585c2
batching_split_before: Better xref for doc hidden
...
And another UNSTABLE warning.
2023-02-13 17:32:54 +00:00
Ian Jackson
1232bb6661
batching_split_before: Clarify API sequential restriction
2023-02-13 17:29:17 +00:00
Ian Jackson
5be6db006c
batching_split_before: Fix and clarify Batches/LendingIterator doc
2023-02-13 17:28:39 +00:00
Ian Jackson
15f33ce13c
batching_split_before: Introduce unit token types
...
And explain why we're not using booleans.
2023-02-13 17:19:13 +00:00
Ian Jackson
73a20cdc36
batching_split_before: Expand on the remaining use of "meta-iterator"
2023-02-13 17:13:55 +00:00
Ian Jackson
04e3a22b82
batching_split_before: Fix link to BatchesWithHeader::subsequent
2023-02-13 17:12:17 +00:00
Ian Jackson
53ef0d65ea
batching_split_before: Provide description for BatchesWithHeader
2023-02-13 17:09:08 +00:00
Ian Jackson
6799fb6e3e
batching_split_before: Document generics on our non-private types
2023-02-13 17:04:29 +00:00
Ian Jackson
e44be77f52
batching_split_before: Rename "prefix" to "header"
...
As per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1016#note_2877759
"_prefixed" becomes "_with_header". That mirrors the returned struct
which is nice.
2023-02-13 16:55:36 +00:00
Ian Jackson
72b1cb797d
batching_split_before: Rename "start" to "batch-starting"
...
Roughly as per
https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1016#note_2877822
2023-02-13 16:52:07 +00:00
Ian Jackson
09060b4748
batching_split_before: Remove false assertions about batch contents
2023-02-13 16:44:47 +00:00
Ian Jackson
4333a1ef1c
batching_split_before: Clarify heading of BatchesWithPrefix
2023-02-13 16:37:13 +00:00
Nick Mathewson
5c1cbd5486
batching_split_before: docs improvements.
2023-02-13 16:12:26 +00:00
Nick Mathewson
7363bee6a4
netdoc: give hsdesc test info in its original form.
2023-02-13 10:30:27 -05:00
Ian Jackson
8703a969f4
tor-netdoc: Use batching iterator in authcert.rs
...
This gets rid of a lot of manual boolean state variable iterator
stuff.
2023-02-10 19:48:26 +00:00
Ian Jackson
d35f7990e8
tor-netdoc: Use batching_split_before in HsDescInner
2023-02-10 19:47:45 +00:00
Ian Jackson
fd35f05b26
tor-netdoc: Provide new batching_split_before
...
There will be two call sites to demonstrate it.
Eventually maybe this will want to be in tor-basic-utils, since it
doesn't depend on any of the tor-netdoc types. But it would be
sensible to wait until the situation with PeekableIterator and
Itertools is improved.
For now we make this #[doc(hidden)] to avoid it becoming part of our
stable API.
2023-02-10 19:47:45 +00:00
Ian Jackson
1b5a5eb57a
tor-netdoc: Provide NetDocReader::into_iter
...
This will avoids some hairy borrowck disasters when we try to use
iterator adapters.
2023-02-10 19:47:45 +00:00
Ian Jackson
5f0ff78c2d
tor-netdoc: util: use super::* in tests
...
Not xure how my MR to try to do this everyone missed this one.
2023-02-10 19:47:45 +00:00
Ian Jackson
a5be14ed5e
tor-netdoc: util: Add standard lint block to tests
...
Not xure how my MR to try to do this everyone missed this one.
2023-02-10 12:47:02 +00:00
Nick Mathewson
3f5502c5bc
netdoc: Add a test for HSDesc decryption.
2023-02-10 07:36:40 -05:00
Nick Mathewson
ced33029f6
Add another test hsdesc to parse.
...
This one was generated (by dgoulet) using `ClientDescEncKey`
encryption. Its information is:
```
Address: paozpdhgz2okvc6kgbxvh2bnfsmt4xergrtcl4obkhopyvwxkpjzvoad.onion
Time period: 19397
Client:
paozpdhgz2okvc6kgbxvh2bnfsmt4xergrtcl4obkhopyvwxkpjzvoad:descriptor:x25519:SDZNMD4RP4SCH4EYTTUZPFRZINNFWAOPPKZ6BINZAC7LREV24RBQ
Service:
descriptor:x25519:SACGOAEODFGCYY22NYZV45ZESFPFLDGLMBWFACKEO34XGHASSAMQ
```
2023-02-10 07:26:31 -05:00
Ian Jackson
62fa652fcd
Merge branch 'hsdir' into 'main'
...
Compute the HS directory hash ring
See merge request tpo/core/arti!1012
2023-02-09 16:35:42 +00:00
Nick Mathewson
73ce68ac21
Rename DescEncNonce => HsDescEncNonce
2023-02-09 08:57:09 -05:00
Ian Jackson
f5c3c1f277
hsdir: Be able to enumerate the hidden service directories
...
* Provide an accessor for the HSDIR flag
* Provide a function for testing a relay for hsdir inclusion
* Provide an iterator on NetDir that returns the hsdirs
2023-02-09 13:01:37 +00:00
Ian Jackson
81d4e6971b
tor-netdoc: Discuss that relays are ordered by rsa id in Consensus
2023-02-09 12:56:18 +00:00
Nick Mathewson
0a80c468df
hsdesc: Use an IntegerMinutes<u16> to hold lifetime.
2023-02-08 13:33:07 -05:00
Nick Mathewson
39f5f90f3f
netdoc: Fix most "TODO HS rename" comments
2023-02-08 13:23:21 -05:00
Nick Mathewson
8c3bd3626b
netdoc::hsdesc: Distinguish layer from document.
2023-02-08 13:16:44 -05:00
Nick Mathewson
966ddeb092
netdoc::hsdesc: Rename "layer" modules.
2023-02-08 13:08:57 -05:00
Nick Mathewson
964ca511c4
netdoc::hsdesc: Excise reference to "password" authentication
...
As far as we can tell, this never existed.
2023-02-08 12:57:52 -05:00
Nick Mathewson
cce56c793b
hscrypto,netdoc: Add and use a type for KP_hss_desc_enc.
2023-02-08 12:50:34 -05:00
Nick Mathewson
99ec1c9818
tor-hscrypto: Rename key types to correspond to new spec names.
2023-02-08 12:27:36 -05:00
Nick Mathewson
d1ee5807ed
Rename DescriptorCookie to DescEncNonce
...
(I think it's okay to omit the Hs here, since this type is not
visible outside the hsdesc parsing code. I'll rename if others
disagree.)
2023-02-08 12:10:24 -05:00
Nick Mathewson
39e1116ece
Renaming cleanup for and around now-renamed "KP_hs_desc_ephem".
2023-02-08 12:06:42 -05:00
Nick Mathewson
18e8ac7cb6
Rename key identifiers that have changed in the spec
...
Generated with perl:
s/K([PS])_hs_intro_tid/K$1_hs_ipt_sid/g;
s/K([PS])_onion_ntor/K$1_ntor/g;
s/K([PS])_hs_intro_ntor/K$1_hss_ntor/g;
s/K([PS])_hs_desc_ephem/K$1_hss_desc_enc/g;
2023-02-08 11:57:51 -05:00
Dimitris Apostolou
d1eeffbf42
Fix typo
2023-02-08 00:04:25 +02:00
Nick Mathewson
f537a7ad48
Update hsdesc parser code to new sectionrules::builder code.
2023-02-07 15:28:10 -05:00
eta
c7c4fff66e
Merge branch 'authcert_bug' into 'main'
...
Fix AuthCert behavior on unrecognized tokens, and prevent bug from recurring elsewhere.
Closes #752
See merge request tpo/core/arti!1006
2023-02-07 16:06:20 +00:00
Nick Mathewson
a1c36b2087
netdoc: Add a comment about renaming layer to document.
2023-02-07 09:02:15 -05:00
Nick Mathewson
257aaf9e5b
netdoc::hsdesc: rename Passwd to Password.
2023-02-07 09:02:15 -05:00
Nick Mathewson
2ba28aa289
netdoc: Rename/comment objects from hsdesc.
2023-02-07 09:02:15 -05:00
Nick Mathewson
d10ccf0dc5
netdoc: Rename/comment objects from inner_layer.
2023-02-07 09:02:15 -05:00
Nick Mathewson
1cdd36f511
netdoc: Rename/comment objects from middle_layer.
2023-02-07 09:02:15 -05:00
Nick Mathewson
1a59005ae0
netdoc: Rename/comment objects from desc_enc
2023-02-07 09:02:15 -05:00
Nick Mathewson
7701e02aad
netdoc: Renaming and comments in outer_layer.
2023-02-07 09:02:15 -05:00
Nick Mathewson
68d2ccf5fe
netdoc: Use Itertools::exactly_once in hsdesc parsing
2023-02-07 09:02:15 -05:00
Nick Mathewson
3d53a30c94
netdoc: Remove useless should_be_exhausted calls.
2023-02-07 09:02:15 -05:00