<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/arti.git/crates/tor-proto/src/channel, branch arti-v0.4.0</title>
<subtitle>mirror of https://gitlab.torproject.org/tpo/core/arti
</subtitle>
<id>http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v0.4.0</id>
<link rel='self' href='http://git.dilluti0n.com/mirrors/arti.git/atom?h=arti-v0.4.0'/>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/'/>
<updated>2022-05-23T10:28:05Z</updated>
<entry>
<title>prepare_send_from: clippy: Replace some or_else with or</title>
<updated>2022-05-23T10:28:05Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-05-20T15:49:30Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2fc6c8a194fa668e5bdb9d94d25e29c5e1666a21'/>
<id>urn:sha1:2fc6c8a194fa668e5bdb9d94d25e29c5e1666a21</id>
<content type='text'>
</content>
</entry>
<entry>
<title>channel: Provide and use Sink::prepare_send_from</title>
<updated>2022-05-23T10:28:05Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-05-18T15:02:52Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=793782acc80c05e2d2e125c65721c7a0b967d113'/>
<id>urn:sha1:793782acc80c05e2d2e125c65721c7a0b967d113</id>
<content type='text'>
This is a general-purpose implementation of the ad-hoc approach
currently taken in (eg) crates/tor-proto/src/channel/reactor.rs,
with an API intended to defned against the more obvious mistakes.

This allows us to separate the two concerns: the channel reactor can
focus on handling channel cells and control messages and is over 2.5x
shorter.

The complexity of the manual sink implementation, and the machinery
needed to avoid having to suspend while holding an item, are dealt
with separately.  That separate implemenation now has proper
documentation.  (Tests are in the nest commit to avoid this one being
even more unwieldy.)

We use `extend` to define this as an extension trait.  A competitor is
`ext` but in my personal projects I have found `extend` slightly
better.
</content>
</entry>
<entry>
<title>clippy: Change a binding to (), and allow clippy::let_unit_value</title>
<updated>2022-05-11T17:52:12Z</updated>
<author>
<name>Ian Jackson</name>
<email>ijackson@chiark.greenend.org.uk</email>
</author>
<published>2022-05-11T14:30:28Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0cc94d449ed5853838221a882f66c7838a36ee3f'/>
<id>urn:sha1:0cc94d449ed5853838221a882f66c7838a36ee3f</id>
<content type='text'>
The type of ret.map_err(codec_err_to_chan)? is ().  ISTM that
writing `let () = ` makes it clear that there is nothing there,
but the lint forbids this.

This lint is warn by default and trips here for me on current nightly.

It seems wrong to me.  We should be able to make it clear to the
reader that there is nothing here - note how this differs from the
lines below where Ready contains msg.  A let () binding is a good way
to do that.

I think the lint allow ought to be added everywhere, but that doesn't
seem easy right now - see this issue about maint/add_warning:
   https://gitlab.torproject.org/tpo/core/arti/-/issues/469
</content>
</entry>
<entry>
<title>squash! Bump every crate's edition to 2021.</title>
<updated>2022-04-25T17:06:26Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-04-25T16:40:33Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=2f6bc6bdc431fa36de70a167eea777dcf3f60bf2'/>
<id>urn:sha1:2f6bc6bdc431fa36de70a167eea777dcf3f60bf2</id>
<content type='text'>
Remove all `use` statements for `TryFrom` and `TryInto`.  These are
now redundant in Rust 2021.
</content>
</entry>
<entry>
<title>handshake.rs: Document the time for clock skew authentication.</title>
<updated>2022-04-11T16:34:16Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-04-11T16:31:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=4efe45ce6e14672625dea392b93da9cf43c72ec1'/>
<id>urn:sha1:4efe45ce6e14672625dea392b93da9cf43c72ec1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chanmgr: bubble ClockSkew up through the Error object.</title>
<updated>2022-04-07T14:15:28Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-04-07T14:01:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=9160b55c57e9b2d68b82059139a2be0dd7954b8a'/>
<id>urn:sha1:9160b55c57e9b2d68b82059139a2be0dd7954b8a</id>
<content type='text'>
Fortunately, we don't need a separate type here: authenticated
clock skew can only come attached to a `tor_proto::Error`.

We also remove skew from `tor_proto::Error::HandshakeCertsExpired`,
since it would now be redundant.
</content>
</entry>
<entry>
<title>Channel: Expose our view of whether the clock is skewed, and the age</title>
<updated>2022-04-07T14:07:35Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-04-06T19:29:24Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=7656ab09319aacbc8ef0e89e34a7dd5ce0ba1d85'/>
<id>urn:sha1:7656ab09319aacbc8ef0e89e34a7dd5ce0ba1d85</id>
<content type='text'>
of a channel.

At first I wanted to have this information not be a part of channels
at all, but it is a fairly tiny amount of data, and the alternatives
are pretty crufty.
</content>
</entry>
<entry>
<title>Merge branch 'netinfo-clock-skew' into 'main'</title>
<updated>2022-03-23T12:49:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-03-23T12:49:36Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=791394cd2b455646c5e8938e7592d73b28c7977b'/>
<id>urn:sha1:791394cd2b455646c5e8938e7592d73b28c7977b</id>
<content type='text'>
tor-proto: add the ability to learn clock skew from NETINFO cells

See merge request tpo/core/arti!410</content>
</entry>
<entry>
<title>tor-proto: better errors when handshake fails due to untimely certs</title>
<updated>2022-03-23T12:24:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-03-14T18:33:11Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=0b2cf533ee5771fdb16255652837af69c316642e'/>
<id>urn:sha1:0b2cf533ee5771fdb16255652837af69c316642e</id>
<content type='text'>
We now check the handshake certificates unconditionally, and only
report them as _expired_ as a last resort.

(Rationale: if somebody is presenting the wrong identity from a year
ago, it is more interesting that they are presenting the wrong ID
than it is that they are doing so with an expired cert.

We also now report a different error if the certificate is expired,
but its expiration is within the range of reported clock skew.

(Rationale: it's helpful to distinguish this case, so that we can
blame the failure on possible clock skew rather than definitely
attributing it to a misbehaving relay.)

Part of #405.
</content>
</entry>
<entry>
<title>tor-proto: add a backend to detect reported clock skew.</title>
<updated>2022-03-23T12:24:36Z</updated>
<author>
<name>Nick Mathewson</name>
<email>nickm@torproject.org</email>
</author>
<published>2022-03-14T15:51:06Z</published>
<link rel='alternate' type='text/html' href='http://git.dilluti0n.com/mirrors/arti.git/commit/?id=3885a2c05b64e6d071adfabdf5eb957fab001a5d'/>
<id>urn:sha1:3885a2c05b64e6d071adfabdf5eb957fab001a5d</id>
<content type='text'>
NETINFO cells, which are sent in every handshake, may contain
timestamps.  This patch adds an accessor for the timestamp in the
Netinfo messages, and teaches the tor-proto code how to compute the
minimum clock skew in the code.

The computation isn't terribly precise, but it doesn't need to be:
Tor should work fine if your clock is accurate to within a few
hours.

This patch also notes a Y2038 problem in the protocol: see
torspec#80.

Part of #405.
</content>
</entry>
</feed>
