Skip to content

tor-proto: add the ability to learn clock skew from NETINFO cells

Nick Mathewson requested to merge nickm/arti:netinfo-clock-skew into main

The NETINFO cell allows relays to report their view of the real time. Clients can use these as a sign of possible clock skew, but only with proper skepticism.

This branch allows tor-proto to expose clock skew during the handshake, to be handled upstream in tor-chanmgr. The clock skew info is not yet used; that'll be done in a later commit.

As part of this branch, I've also refactored the code that returns an error from channel violation, so that it prefers returning other errors over clock skew or circuit expiration errors: there's more rationale in the commit message.

Related to #405 (closed).

Edited by Nick Mathewson

Merge request reports

Loading