1. 11 Jan, 2021 1 commit
    • Nick Mathewson's avatar
      Reject obsolete router/extrainfo descs more quietly. · ca6ccd37
      Nick Mathewson authored
      Thanks to proposal 315 / ticket #30132, more fields are now
      required in these documents.  But ancient Tors that try to upload
      obsolete documents were causing the authorities to log warnings
      about missing fields, and to do so very spammily.
      We now detect the missing fields before tokenizing, and log at
      debug.  This is a bit of ugliness, but it's probably a safer choice
      than making _all_ unparseable-desc warnings into debug-level logs.
      I'm looking at identity-ed25519 in extrainfos and proto in
      routerdescs because they were (I believe) the latest-added fields in
      Tor's history: any Tor that lacks them will also lack the other
      newly required fields.
      Fixes bug #40238; bugfix on
  2. 12 Nov, 2020 1 commit
    • Samanta Navarro's avatar
      Fix typos. · 4a0cd795
      Samanta Navarro authored and David Goulet's avatar David Goulet committed
      Typos found with codespell.
      Please keep in mind that this should have impact on actual code
      and must be carefully evaluated:
      -    ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER)
  3. 15 Oct, 2020 1 commit
  4. 14 Jul, 2020 1 commit
    • David Goulet's avatar
      addr: Use tor_addr_t instead of uint32_t for IPv4 · 15860c88
      David Goulet authored
      This changes a LOT of code but in the end, behavior is the same.
      Unfortunately, many functions had to be changed to accomodate but in majority
      of cases, to become simpler.
      Functions are also removed specifically those that were there to convert an
      IPv4 as a host format to a tor_addr_t. Those are not needed anymore.
      The IPv4 address field has been standardized to "ipv4_addr", the ORPort to
      "ipv4_orport" (currently IPv6 uses ipv6_orport) and DirPort to "ipv4_dirport".
      This is related to Sponsor 55 work that adds IPv6 support for relays and this
      work is needed in order to have a common interface between IPv4 and IPv6.
      Closes #40043.
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  5. 06 Feb, 2020 1 commit
  6. 08 Jan, 2020 1 commit
  7. 20 Dec, 2019 1 commit
    • teor's avatar
      Replace several C identifiers. · 8c23ac4a
      teor authored
      This is an automated commit, generated by this command:
      ./scripts/maint/rename_c_identifier.py \
  8. 05 Sep, 2019 1 commit
  9. 16 Jan, 2019 2 commits
  10. 18 Dec, 2018 1 commit
    • Nick Mathewson's avatar
      Avoid a needless decode/re-encode step in assigning onion keys · 7113a339
      Nick Mathewson authored
      Previously we had decoded the asn.1 to get a public key, and then
      discarded the asn.1 so that we had to re-encode the key to store it
      in the onion_pkey field of a microdesc_t or routerinfo_t.
      Now we can just do a tor_memdup() instead, which should be loads
  11. 01 Oct, 2018 15 commits
  12. 25 Sep, 2018 1 commit
  13. 20 Sep, 2018 1 commit
    • Nick Mathewson's avatar
      Split most of dirserv.c into several new modules · b54a5e70
      Nick Mathewson authored
      In dirauth:
        * bwauth.c reads and uses bandwidth files
        * guardfraction.c reads and uses the guardfraction file
        * reachability.c tests relay reachability
        * recommend_pkg.c handles the recommended-packages lines.
        * recv_descs.c handles fingerprint files and processing incoming
          routerinfos that relays upload to us
        * voteflag.c computes flag thresholds and sets those thresholds on
          routerstatuses when computing votes
      In control:
        * fmt_serverstatus.c generates the ancient "v1 server status"
          format that controllers expect.
      In nodelist:
        * routerstatus_fmt.c formats routerstatus entries for a consensus,
          a vote, or for the controller.
  14. 19 Sep, 2018 1 commit
  15. 18 Sep, 2018 1 commit
  16. 12 Sep, 2018 1 commit
  17. 11 Sep, 2018 3 commits
  18. 30 Aug, 2018 1 commit
  19. 29 Aug, 2018 1 commit
    • David Goulet's avatar
      router: Keep RSA onion public key in ASN.1 format · 2f6bc749
      David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
      The OpenSSL "RSA" object is currently 408 bytes compares to the ASN.1 encoding
      which is 140 for a 1024 RSA key.
      We save 268 bytes per descriptor (routerinfo_t) *and* microdescriptor
      (microdesc_t). Scaling this to 6000 relays, and considering client usually
      only have microdescriptors, we save 1.608 MB of RAM which is considerable for
      mobile client.
      This commit makes it that we keep the RSA onion public key (used for TAP
      handshake) in ASN.1 format instead of an OpenSSL RSA object.
      Changes is done in both routerinfo_t and microdesc_t.
      Closes #27246
      Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>
  20. 05 Jul, 2018 3 commits
    • Nick Mathewson's avatar
    • Nick Mathewson's avatar
      Fix every include path changed in the previous commit (automated) · ef486e3c
      Nick Mathewson authored
      I am very glad to have written this script.
    • Nick Mathewson's avatar
      Move literally everything out of src/or · 63b4ea22
      Nick Mathewson authored
      This commit won't build yet -- it just puts everything in a slightly
      more logical place.
      The reasoning here is that "src/core" will hold the stuff that every (or
      nearly every) tor instance will need in order to do onion routing.
      Other features (including some necessary ones) will live in
      "src/feature".  The "src/app" directory will hold the stuff needed
      to have Tor be an application you can actually run.
      This commit DOES NOT refactor the former contents of src/or into a
      logical set of acyclic libraries, or change any code at all.  That
      will have to come in the future.
      We will continue to move things around and split them in the future,
      but I hope this lays a reasonable groundwork for doing so.
  21. 03 Jul, 2018 1 commit