Skip to content
Snippets Groups Projects
  1. Apr 04, 2022
    • Nick Mathewson's avatar
      Add RetrySchedule::reset() · 57608f96
      Nick Mathewson authored
      Previously the code would do stuff like
      
      ```
          schedule = RetrySchedule::new(INITIAL_DELAY);
      ```
      
      which is needlessly verbose, since the schedule already keeps track
      of its initial delay.
      57608f96
  2. Apr 02, 2022
  3. Apr 01, 2022
  4. Mar 30, 2022
    • Nick Mathewson's avatar
      Implement Ord for Ed25519Identity. · ea520898
      Nick Mathewson authored
      ea520898
    • Nick Mathewson's avatar
      b28863f0
    • Nick Mathewson's avatar
      Move fallback.rs into guardmgr. · 80b65c3a
      Nick Mathewson authored
      This is the logical place for it, I think: the GuardMgr's job is to
      pick the first hop for a circuit depending on remembered status for
      possible first hops.  Making this change will let us streamline the
      code that interacts with these objects.
      80b65c3a
    • eta's avatar
      Make daemon tasks self-contained; introduce NetDirProvider · ac64bdea
      eta authored
      The various background daemon tasks that `arti-client` used to spawn are
      now handled inside their respective crates instead, with functions
      provided to spawn them that return `TaskHandle`s.
      
      This required introducing a new trait, `NetDirProvider`, which steals
      some functionality from the `DirProvider` trait to enable `tor-circmgr`
      to depend on it (`tor-circmgr` is a dependency of `tor-dirmgr`, so it
      can't depend on `DirProvider` directly).
      
      While we're at it, we also make some of the tasks wait for events from
      the `NetDirProvider` instead of sleeping, slightly increasing
      efficiency.
      ac64bdea
  5. Mar 23, 2022
    • Nick Mathewson's avatar
      tor-proto: better errors when handshake fails due to untimely certs · 0b2cf533
      Nick Mathewson authored
      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.
      0b2cf533
    • Nick Mathewson's avatar
      tor-proto: add a backend to detect reported clock skew. · 3885a2c0
      Nick Mathewson authored
      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.
      3885a2c0
  6. Mar 21, 2022
    • Nick Mathewson's avatar
      dirclient: Collect and expose peer information from errors. · acfa0f77
      Nick Mathewson authored
      This commit refactors the dirclient error type into two cases:
      errors when constructing a circuit, and errors that occur once we
      already have a one-hop circuit.  The latter can usually be
      attributed to the specific cache we're talking to.
      
      This commit also adds a function to expose the information about
      which directory gave us the info.
      acfa0f77
    • Nick Mathewson's avatar
      Expose more peer information from circuit build failures · d38aafa0
      Nick Mathewson authored
      We already have the ability to get peer information from ChanMgr
      errors, and therefore from any RetryErrors that contain ChanMgr
      errors.
      
      This commit adds optional peer information to tor-proto errors, and
      a function to expose whatever peer information is available.
      d38aafa0
    • Nick Mathewson's avatar
      circmgr: Change API for using FallbackDirs · d778a922
      Nick Mathewson authored
      It'll soon more convenient to pass in FallbackDirs as a slice of
      references, rather than just a slice of FallbackDirs: I'm going to
      be changing how we handle these in tor-dirmgr.
      d778a922
  7. Mar 18, 2022
  8. Mar 17, 2022
  9. Mar 16, 2022
  10. Mar 14, 2022
  11. Mar 11, 2022
  12. Mar 07, 2022
    • Ian Jackson's avatar
    • Ian Jackson's avatar
      Have ArtiConfig contain a TorClientConfig, and drop builder retcon · 56cb1cef
      Ian Jackson authored
      Replace the recapitulation of TorClientConfig fields in ArtiConfig and
      instead just have it contain one.  This is part of #374.
      
      The conversions from ArtiConfig back to ArtiConfigBuilder and
      TorClientConfigBuilder would need to change, but, since we don't want
      them anyway,
      
      No longer impl Deserialize for ArtiConfig.  (As per #371 this will
      want to become a private type.)
      
      No longer impl From<ArtiConfig> for ArtiConfigBuilder and
      TorClientConfigBuilder.  And abolish tests of that code.
      
      (This all has to be in one commit, because previously
      ArtiConfig::tor_client_config used the validated-to-builder config
      retcon.)
      56cb1cef
  13. Mar 04, 2022
    • Nick Mathewson's avatar
      Add a from_hex method for RsaIdentity. · b6452b48
      Nick Mathewson authored
      We perform this operation in a bunch of places, and most of them
      use hex::decode().  That's not great, since hex::decode() has to do
      heap allocation.  This implementation uses hex::decode_to_slice(),
      which should be faster.
      
      (In the future we might choose to use one of the faster hex
      implementations, but I'm hoping that this change will be sufficient
      to get hex decoding out of our profiles.)
      
      Part of #377.
      b6452b48
  14. Mar 03, 2022
    • Nick Mathewson's avatar
      arti-client: Make dirmgr() and circmgr() return &Arc<..> · a4914b99
      Nick Mathewson authored
      Previously they returned an Arc, which wasn't necessary unless the
      client actually _wanted_ a new Arc.
      
      This would be an API break, except that these functions are marked
      'experimental-api', so semver does not apply; nonetheless I've noted
      the break in semver_status.md, just in case we care.
      
      Closes #369
      a4914b99
  15. Jan 11, 2022
  16. Dec 08, 2021
  17. Dec 04, 2021
  18. Dec 02, 2021
  19. Nov 30, 2021
  20. Nov 18, 2021
  21. Nov 12, 2021
Loading