1. 06 May, 2020 3 commits
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 28ac17f4
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.2 version.)
      28ac17f4
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · 79ff2b6a
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      
      (In order to avoid conflicts, I'm applying this script separately to
      each maint branch. This is the 0.4.1 version.)
      79ff2b6a
    • Nick Mathewson's avatar
      Use __attribute__((fallthrough)) rather than magic GCC comments. · cc397449
      Nick Mathewson authored
      GCC added an implicit-fallthrough warning a while back, where it
      would complain if you had a nontrivial "case:" block that didn't end
      with break, return, or something like that.  Clang recently added
      the same thing.
      
      GCC, however, would let you annotate a fall-through as intended by
      any of various magic "/* fall through */" comments.  Clang, however,
      only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
      accepts that too.
      
      A previous commit in this branch defined a FALLTHROUGH macro to do
      the right thing if GNUC is defined; here we replace all of our "fall
      through" comments with uses of that macro.
      
      This is an automated commit, made with the following perl one-liner:
      
        #!/usr/bin/perl -i -p
        s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
      cc397449
  2. 05 Feb, 2020 2 commits
  3. 16 Jan, 2019 2 commits
  4. 18 Dec, 2018 1 commit
    • Nick Mathewson's avatar
      Use a single path for all PEM-like objects in get_next_token() · 05569422
      Nick Mathewson authored
      Previously, we would decode the PEM wrapper for keys twice: once in
      get_next_token, and once later in PEM decode.  Now we just do all of
      the wrapper and base64 stuff in get_next_token, and store the
      base64-decoded part in the token object for keys and non-keys alike.
      
      This change should speed up parsing slightly by letting us skip a
      bunch of stuff in crypto_pk_read_*from_string(), including the tag
      detection parts of pem_decode(), and an extra key allocation and
      deallocation pair.
      
      Retaining the base64-decoded part in the token object will allow us
      to speed up our microdesc parsing, since it is the asn1 portion that
      we actually want to retain.
      05569422
  5. 17 Dec, 2018 1 commit
    • Nick Mathewson's avatar
      Replace use of strcmp_len() with new mem_eq_token(). · a0fad398
      Nick Mathewson authored
      The strcmp_len() function was somewhat misconceived, since we're
      only using it to test whether a length+extent string is equal to a
      NUL-terminated string or not.  By simplifying it and making it
      inlined, we should be able to make it a little faster.
      
      (It *does* show up in profiles.)
      
      Closes ticket 28856.
      a0fad398
  6. 14 Dec, 2018 2 commits
  7. 01 Oct, 2018 2 commits
  8. 11 Jul, 2018 1 commit
  9. 10 Jul, 2018 1 commit
    • Nick Mathewson's avatar
      Rename torlog.[ch] to log.[ch] · e7f5f48d
      Nick Mathewson authored
      Fun fact: these files used to be called log.[ch] until we ran into
      conflicts with systems having a log.h file.  But now that we always
      include "lib/log/log.h", we should be fine.
      e7f5f48d
  10. 05 Jul, 2018 2 commits
    • 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.
      ef486e3c
    • 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.
      63b4ea22
  11. 01 Jul, 2018 1 commit
  12. 28 Jun, 2018 1 commit
  13. 27 Jun, 2018 1 commit
  14. 22 Jun, 2018 2 commits
  15. 20 Jun, 2018 2 commits
  16. 01 May, 2018 1 commit
  17. 13 Sep, 2017 1 commit
  18. 09 Aug, 2017 1 commit
  19. 15 Mar, 2017 1 commit
  20. 04 Nov, 2016 2 commits