- 16 Apr, 2021 1 commit
-
-
Nick Mathewson authored
This function has been a no-op since Libevent 2.0.4-alpha, when libevent got an arc4random() implementation. Libevent has finally removed it, which will break our compilation unless we stop calling it. (This is currently breaking compilation in OSS-fuzz.) Closes #40371.
-
- 22 Jul, 2020 1 commit
-
-
Nick Mathewson authored
Without this fix, if an PT forgets to send a USERADDR command, that results in a connection getting treated as local for the purposes of rate-limiting. If the PT _does_ use USERADDR, we still believe it. Closes ticket 33747.
-
- 06 May, 2020 2 commits
-
-
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;
-
Nick Mathewson authored
-
- 20 Mar, 2020 2 commits
-
-
teor authored
Return early when there is no suitable IPv6 ORPort. Show the address and port on error, using a convenience function. Code simplification and refactoring. Cleanup after 32588.
-
teor authored
When IPv6 ORPorts are set to "auto", tor relays and bridges would advertise an incorrect port in their descriptor. This may be a low-severity memory safety issue, because the published port number may be derived from uninitialised or out-of-bounds memory reads. Fixes bug 32588; bugfix on 0.2.3.9-alpha.
-
- 12 Feb, 2020 1 commit
-
-
This patch ensures that we always lowercase the BridgeDistribution from torrc in descriptors before submitting it. See: https://bugs.torproject.org/32753
-
- 18 Sep, 2019 2 commits
-
-
Nick Mathewson authored
Our dimap code asserts if you try to add the same key twice; this can't happen if everything is running smoothly, but it's possible if you try to start a relay where secret_onion_key_ntor is the same as secret_onion_key_ntor.old. Fixes bug 30916; bugfix on 0.2.4.8-alpha when ntor keys were introduced.
-
Nick Mathewson authored
No behavioral change here: this is just refactoring.
-
- 17 May, 2019 1 commit
-
-
Nick Mathewson authored
Previously we purged it in 1-hour increments -- but one-hour is the maximum TTL for the cache! Now we do it in 25%-TTL increments. Fixes bug 29617; bugfix on 0.3.5.1-alpha.
-
- 16 Jan, 2019 1 commit
-
-
Nick Mathewson authored
-
- 17 Dec, 2018 1 commit
-
-
Nick Mathewson authored
Also, turn an absent hostname into a BUG(), not a crash. Found by scan-build. Closes ticket 28879; bugfix on 0.1.2.7-alpha
-
- 01 Oct, 2018 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
-
- 27 Sep, 2018 2 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
This commit just moves the code to two separate files. The geoip code still has a few needless dependencies on core/* and features/*.
-
- 25 Sep, 2018 11 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
Make them only include the headers that they needed, and sort their headers while we're at it.
-
Nick Mathewson authored
Since this is completely core functionality, I'm putting it in core/mainloop, even though it depends on feature/hibernate. We'll have to sort that out in the future.
-
Nick Mathewson authored
(It turns out that some of the functions in router.h didn't even exist any more, so I just got to delete their declarations completely.)
-
Nick Mathewson authored
-
Nick Mathewson authored
Note that I haven't separated the headers yet (there's still an
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
This is preparation for having a routermode.h as well
-
Nick Mathewson authored
-
Nick Mathewson authored
This is also used by onion services, so it needs to go in another module.
-
- 21 Sep, 2018 3 commits
-
-
Nick Mathewson authored
Parts of this C file naturally belong in dircache, dirclient, and dircommon: so, move them there.
-
Nick Mathewson authored
The main.c code is responsible for initialization and shutdown; the mainloop.c code is responsible for running the main loop of Tor. Splitting the "generic event loop" part of mainloop.c from the event-loop-specific part is not done as part of this patch.
-
Nick Mathewson authored
The parts for handling cell formats should be in src/core/or. The parts for handling onionskin queues should be in src/core/or. Only the crypto wrapper belongs in src/core/crypto.
-
- 20 Sep, 2018 1 commit
-
-
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.
-
- 19 Sep, 2018 1 commit
-
-
Nick Mathewson authored
There are now separate modules for: * the list of router descriptors * the list of authorities and fallbacks * managing authority certificates * selecting random nodes
-
- 04 Sep, 2018 1 commit
-
-
Nick Mathewson authored
This function was a wrapper around RSA_check_key() in openssl, which checks for invalid RSA private keys (like those where p or q are composite, or where d is not the inverse of e, or where n != p*q). We don't need a function like this in NSS, since unlike OpenSSL, NSS won't let you import a bogus private key. I've renamed the function and changed its return type to make it more reasonable, and added a unit test for trying to read a key where n != p*q.
-
- 29 Aug, 2018 1 commit
-
-
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 <dgoulet@torproject.org>
-
- 22 Aug, 2018 1 commit
-
-
David Goulet authored
Part of #27215, we need to call the ed_key_init_from_file function during option_validate() which is before the global_options variable is set. This commit make ed_key_init_from_file() stop using get_options() and instead now has a or_options_t parameter. Signed-off-by:
David Goulet <dgoulet@torproject.org>
-
- 21 Aug, 2018 1 commit
-
-
Nick Mathewson authored
-
- 08 Aug, 2018 2 commits
- 26 Jul, 2018 1 commit
-
-
rl1987 authored
-
- 17 Jul, 2018 1 commit
-
-
Neel Chauhan authored
-