<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-netdoc/src/doc/authcert.rs, branch arti-v2.5.0</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.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v2.5.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2026-06-24T12:24:30Z</updated>
<entry>
<title>tor-netdoc: Replace string slices with str::get() in doc (fmt)</title>
<updated>2026-06-24T12:24:30Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-06-24T12:24:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=648117f59cd083736d7055e2399d87034bd47f11'/>
<id>urn:sha1:648117f59cd083736d7055e2399d87034bd47f11</id>
<content type='text'>
No functional change, just reformatting.
</content>
</entry>
<entry>
<title>tor-netdoc: Replace string slices with str::get() in doc</title>
<updated>2026-06-24T12:22:30Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-06-24T12:22:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9587e70a6f8155f15dc454a1d70d14d1fd774382'/>
<id>urn:sha1:9587e70a6f8155f15dc454a1d70d14d1fd774382</id>
<content type='text'>
This commit replaces the use of string slices with str::get() in all
document related code.

While this is not a perfect replacement for it, the relevant parts in
the code heavily depend upon the byte offsets returned by the low level
(legacy) parser where changing it would lead to a very big refactoring.

Nonetheless, this approach is better because returning a bug is better
than crashing.
</content>
</entry>
<entry>
<title>tor-netdoc: tests: Move poc authcert test to authcert.rs</title>
<updated>2026-06-17T09:33:17Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-11T14:42:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=48aba6978c538ef4c16b9f2febc87223b8097b12'/>
<id>urn:sha1:48aba6978c538ef4c16b9f2febc87223b8097b12</id>
<content type='text'>
There is no separate poc authcert type any more.  This is a perfectly
fine test case.

Almost entirely code motion; review with
  git show --color-moved --color-moved-ws=allow-indentation-change
</content>
</entry>
<entry>
<title>tor-netdoc: Use assert_eq_or_diff in three more places</title>
<updated>2026-06-11T11:38:51Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-11T11:31:31Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d40b0d15e3315292948cf0ceeb8127ff2e14670f'/>
<id>urn:sha1:d40b0d15e3315292948cf0ceeb8127ff2e14670f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-netdoc: authcert: use TimerangeBound for UnverifiedAuthCert::verify (fmt)</title>
<updated>2026-06-10T14:42:10Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-04T12:13:00Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=b6e5b60f02eb6c523a42ee3bc726b8dc6a8b94b0'/>
<id>urn:sha1:b6e5b60f02eb6c523a42ee3bc726b8dc6a8b94b0</id>
<content type='text'>
Precisely the result of rustfmt.
</content>
</entry>
<entry>
<title>tor-netdoc: authcert: use TimerangeBound for UnverifiedAuthCert::verify</title>
<updated>2026-06-10T14:42:10Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-04T12:10:18Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=ccac99474f98ef197a7dfc48930c2c67662e7991'/>
<id>urn:sha1:ccac99474f98ef197a7dfc48930c2c67662e7991</id>
<content type='text'>
TimerangeBound is reasonably nice and this will fit in better when we
want to verify votes.

Adjust the one non-test call site (in tor-dirserver) using .and_then.

In the tests:

 * Where we expected success, call .check_valid_at and add another .unwrap().
 * Where we expected signature verification failure, delete the time parameters.
 * Where we expected timeliness failure, call .check_valid_at and map the error.
 * With nontrivial tolerance, add calls to `extend_[pre_]tolerance`.
</content>
</entry>
<entry>
<title>tor-netdoc: authcert tests: add some parentheses</title>
<updated>2026-06-10T14:41:46Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-04T12:10:14Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9257037726c831326c2b3cfe2feda003482482ee'/>
<id>urn:sha1:9257037726c831326c2b3cfe2feda003482482ee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tor-netdoc: authcert tests: insist on return value type</title>
<updated>2026-06-10T14:41:46Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2026-06-04T12:09:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4bc868daac9504853c1b66529c5c884956e085f9'/>
<id>urn:sha1:4bc868daac9504853c1b66529c5c884956e085f9</id>
<content type='text'>
We're about to make UnverifiedAuthCert::verify return a
TimerangeBound, not an AuthCert.

For the success cases, declare the expected return type.
</content>
</entry>
<entry>
<title>everywhere: Add #[allow(clippy::string_slice)]</title>
<updated>2026-06-09T16:02:36Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-06-09T16:00:38Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=d0af4abbd7b371f1eade609202a730cd9a1c21d3'/>
<id>urn:sha1:d0af4abbd7b371f1eade609202a730cd9a1c21d3</id>
<content type='text'>
This commit adds #[allow(clippy::string_slice)] to all functions in the
code where string slices are used, alongside a TODO comment.

We do this add the function header to have it consistent, as things like
expression based allow's are still experimental.
</content>
</entry>
<entry>
<title>maint: Run maint/add_warning to deny string slices</title>
<updated>2026-06-09T15:36:01Z</updated>
<author>
<name>Clara Engler</name>
<email>cve@cve.cx</email>
</author>
<published>2026-06-09T15:36:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9f5752a77fb57052c06ead0eeae606831f1e8e97'/>
<id>urn:sha1:9f5752a77fb57052c06ead0eeae606831f1e8e97</id>
<content type='text'>
This commit executes maint/add_warning with the just added change to
deny string slices except in tests.

I recommend auditing this by checking out the previous commit followed
by running the script yourself and then verifying that the diff is
identical to this commit.

This commit makes cargo clippy fail.  We will add exceptions in the next
commit.
</content>
</entry>
</feed>
