<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-netdoc/src/doc/hsdesc.rs, branch arti-v2.5.1</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.1</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.1'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-07-23T10:13:55Z</updated>
<entry>
<title>tor-netdoc: HsDesc parse_decrypt_validate: Fix docs re time bounds</title>
<updated>2026-07-23T10:13:55Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-22T16:13:44Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=1b8570c0f05b063e4e5caee784c7446e9e077f6a'/>
<id>urn:sha1:1b8570c0f05b063e4e5caee784c7446e9e077f6a</id>
<content type='text'>
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/4223#note_3438348
</content>
</entry>
<entry>
<title>HsDesc::parse_decrypt_validate: Don't check validity time (style followup)</title>
<updated>2026-07-23T10:13:55Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T17:45:07Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ccea4f6109c202c832ede4ed63498dcdd73b0f1c'/>
<id>urn:sha1:ccea4f6109c202c832ede4ed63498dcdd73b0f1c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>HsDesc::parse_decrypt_validate: Don't check validity time</title>
<updated>2026-07-23T10:13:54Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T17:11:40Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a96301e177576304c4f99f2dcef3fffcec61b533'/>
<id>urn:sha1:a96301e177576304c4f99f2dcef3fffcec61b533</id>
<content type='text'>
This function returns a `TimeRangeBound`.  That implies a
responsibility on the caller to check the time.  It doesn't make sense
for this function to do the check as well.

But, it turns out that in tor-hsclient, the `TimeRangeBound&lt;HsDesc&gt;`
is sometimes processed with `.dangerously` on the assumption that it
was checked earlier.  I considered changing this, and storing plain
`HsDesc` and a separate `TimeRange` - but that's not right, because
there are places where the `TimeRangeBound&lt;HsDesc&gt;` is used well after
it was verified.

Instead, in this commit, I (effectively) move the `.check_valid_at`
call from `parse_decrypt_validate` to its principal call site.

This involves a change to the error representation.  Previously,
validity time errors ended up as `DescriptorErrorDetail::Descriptor`
containing an `HsDescError::OuterValidation` HsDescError::
InnerValidation`, which in turn contains a
`tor_netdoc::Error`.  (`tor_netdoc::Error` is a rather awkward type.)
Now we have our own error variant.  The overall behaviour is
unchanged.
</content>
</entry>
<entry>
<title>tor-netdoc: hsdesc: Use new TimeRangeBound::build_intersect (fmt)</title>
<updated>2026-07-23T10:13:34Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T17:42:53Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=a0118ce956dd60b6b9ecd68e4c4fe10edf4be746'/>
<id>urn:sha1:a0118ce956dd60b6b9ecd68e4c4fe10edf4be746</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-netdoc: hsdesc: Use new TimeRangeBound::build_intersect</title>
<updated>2026-07-23T10:13:34Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T17:33:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3b91d186577285df8f1e388e3b5df926c211490f'/>
<id>urn:sha1:3b91d186577285df8f1e388e3b5df926c211490f</id>
<content type='text'>
Replace open-coding of various is_valid_at and various dangerously and
intersect.  In more detail:

 * Do most of the processing inside `TimeRangeBound::build_intersect`
 * Replace uses of dangerously_peek etc. with `TimeBound::unwrap_with`
 * The timebound machinery now takes care of doing the intersection

 * Remove the individual `.is_valid_at` calls and replace them with
   one at the end, on the intersection.  This preserves the current
   behaviour except that sometimes time validity errors will now be
   reported as having occurred the wrong level.  We'll deal with this
   in a moment (by deleting these checks from here entirely).

 * There is no need to handle a `None` from `intersect` any more.
   TimeBound handles conflicting time ranges differently: it
   allows ranges which are empty due to being ill-formed.
</content>
</entry>
<entry>
<title>tor-netdoc: hsdesc: Rename a variable</title>
<updated>2026-07-23T10:13:34Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T17:33:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=12bf759a1f158719d7db13e43621af16bf58ca73'/>
<id>urn:sha1:12bf759a1f158719d7db13e43621af16bf58ca73</id>
<content type='text'>
This variable had a different name inside the block, to outside.  This
was confusing, and, fixing it makes the next commit clearer.
</content>
</entry>
<entry>
<title>tor-checkable: Rename `TimeBound::is_valid_at` to `check_valid_at`</title>
<updated>2026-07-23T10:13:34Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T16:51:12Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b97c30a9e666d40601d76b645f44abc6adf42fe9'/>
<id>urn:sha1:b97c30a9e666d40601d76b645f44abc6adf42fe9</id>
<content type='text'>
I find this names confusing.  To my mind "is" implies a function
returning `bool`.
</content>
</entry>
<entry>
<title>tor-checkable: Rename `TimeBound::check_valid_*` to `if_valid_*`</title>
<updated>2026-07-23T10:13:34Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-20T16:40:18Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ca37f30a097696ce2ebd4e9945a4bdaebe086b31'/>
<id>urn:sha1:ca37f30a097696ce2ebd4e9945a4bdaebe086b31</id>
<content type='text'>
I find these names confusing.  To my mind "check" implies a function
returning `Result&lt;(), _&gt;`.

Some other APIs use `unwrap` here but I think `if` is good.
</content>
</entry>
<entry>
<title>Use new TimeRangeBound name throughout the tree</title>
<updated>2026-07-16T15:47:50Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-16T14:35:45Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=92c26c4c07be73c91890ed3d7d4e53a06f26d0a1'/>
<id>urn:sha1:92c26c4c07be73c91890ed3d7d4e53a06f26d0a1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use new TimeBound name throughout the tree</title>
<updated>2026-07-16T15:47:50Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-07-16T14:32:14Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=5f57903ab4a8c280acf8a5bec274c50d5f544fd6'/>
<id>urn:sha1:5f57903ab4a8c280acf8a5bec274c50d5f544fd6</id>
<content type='text'>
</content>
</entry>
</feed>
