summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2015-11-27Use uint16_t, not in_port_t (which does not exist on Windows). See #17638.Nick Mathewson
2015-11-27Check magic number in connection_ap_attach_pendingNick Mathewson
2015-11-26improve log messages to try to track down #17659Nick Mathewson
2015-11-27Unit test the full length of SHA256 and SHA512 digeststeor (Tim Wilson-Brown)
Bugfix on a tor version before the refactoring in git commit cea12251995d (23 Sep 2009). Patch by "teor".
2015-11-26Merge remote-tracking branch 'teor/rand-failure-modes-v2'Nick Mathewson
2015-11-26Fix buffer size in sha512 unit testNick Mathewson
Nobody likes a stack overflow, even in unit tests. Closes 17699; but not in any released tor.
2015-11-26Fix test_tortls.c to no longer test failing crypto_rand.Nick Mathewson
(crypto_rand is no longer allowed to fail.) Closes bug 17686; bug not in any released tor. (No backport, since the tortls tests aren't in 0.2.7)
2015-11-26Correctly free a smartlist in getinfo_helper_policiesteor (Tim Wilson-Brown)
2015-11-26Add unit tests that check for common RNG failure modesteor (Tim Wilson-Brown)
Check that crypto_rand doesn't return all zeroes, identical values, or incrementing values (OpenSSL's rand_predictable feature).
2015-11-25Merge branch 'bug17686_v2_027'Nick Mathewson
2015-11-25Fix documentation for crypto_rand*Nick Mathewson
2015-11-25Now that crypto_rand() cannot fail, it should return void.Nick Mathewson
2015-11-25Add crypto-initializer functions to those whose return values must be checkedNick Mathewson
2015-11-25Make crypto_seed_rng() and crypto_rand() less scary.Nick Mathewson
These functions must really never fail; so have crypto_rand() assert that it's working okay, and have crypto_seed_rng() demand that callers check its return value. Also have crypto_seed_rng() check RAND_status() before returning.
2015-11-25Merge remote-tracking branch 'teor/check-crypto-errors-v2'Nick Mathewson
2015-11-25fixup! Add controller getinfo exit-policy/reject-privateteor (Tim Wilson-Brown)
Stop ignoring ExitPolicyRejectPrivate in getinfo exit-policy/reject-private. Fix a memory leak. Set ExitPolicyRejectPrivate in the unit tests, and make a mock function declaration static.
2015-11-26Check the return value of HMAC in crypto.c and assert on errorteor (Tim Wilson-Brown)
Fixes bug #17658; bugfix on commit in fdbb9cdf746b (11 Oct 2011) in tor version 0.2.3.5-alpha-dev.
2015-11-25Merge branch 'bug17654_try1'Nick Mathewson
2015-11-25Initialize libevent before periodic eventscypherpunks
The initialization of libevent interferes with other tests so we also fork the circuit_timeout test.
2015-11-25fixup! Block OutboundBindAddressIPv[4|6]_ and configured ports on exit relaysteor (Tim Wilson-Brown)
Fix unit tests for get_interface_address6_list to assume less about the interface addresses on the system. Instead, mock get_interface_address6_list and use the mocked function to provide a range of address combinations.
2015-11-25Merge remote-tracking branch 'public/decouple_dir_request_failed'Nick Mathewson
2015-11-25Fix a logic error in connection_tls_continue_handshake().Nick Mathewson
(If we take the branch above this assertion, than we *didn't* have a v1 handshake. So if we don't take the branch, we did. So if we reach this assertion, we must be running as a server, since clients no longer attempt v1 handshakes.) Fix for bug 17654; bugfix on 9d019a7db725dca3dfdbf8d4dbc3b51835e0b49e. Bug not in any released Tor.
2015-11-25Merge remote-tracking branch 'teor/comments-20151123'Nick Mathewson
2015-11-25Tweak gtank's sha512 patch a littleNick Mathewson
2015-11-25Merge remote-tracking branch 'gtank/feature17663'Nick Mathewson
2015-11-25Merge remote-tracking branch 'teor/feature8961-replaycache-sha256'Nick Mathewson
2015-11-25Merge branch 'maint-0.2.7'Nick Mathewson
2015-11-24implement teor's commentsGeorge Tankersley
2015-11-24add SHA512 support to cryptoGeorge Tankersley
2015-11-24Use SHA256 in the replaycache, rather than SHA1teor (Tim Wilson-Brown)
This migrates away from SHA1, and provides further hash flooding protection on top of the randomised siphash implementation. Add unit tests to make sure that different inputs don't have the same hash.
2015-11-23Fix: use the right list in find_expiring_intro_point()David Goulet
The wrong list was used when looking up expired intro points in a rend service object causing what we think could be reachability issues and triggering a BUG log. Fixes #16702 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-11-23fix two typos in commentsRoger Dingledine
2015-11-23Fix comments to describe actual return values (crypto.c)teor (Tim Wilson-Brown)
2015-11-23Fix typo in comment on crypto_add_spaces_to_fpteor (Tim Wilson-Brown)
2015-11-23Comment only: crypto_seed_rng no longer has a "startup" parameterteor (Tim Wilson-Brown)
2015-11-20fix "make check-spaces"Nick Mathewson
2015-11-20Fix compilation warningsNick Mathewson
2015-11-20Merge branch 'getinfo-private-exitpolicy-v4-squashed'Nick Mathewson
2015-11-20Add controller getinfo exit-policy/reject-privateteor (Tim Wilson-Brown)
exit-policy/reject-private lists the reject rules added by ExitPolicyRejectPrivate. This makes it easier for stem to display exit policies. Add unit tests for getinfo exit-policy/*. Completes ticket #17183. Patch by "teor".
2015-11-20bump version to 0.2.7-devNick Mathewson
2015-11-20Refactor router_dump_exit_policy_to_stringteor (Tim Wilson-Brown)
Split out policy_dump_to_string to use it in getinfo_helper_policies.
2015-11-20Block OutboundBindAddressIPv[4|6]_ and configured ports on exit relaysteor (Tim Wilson-Brown)
Modify policies_parse_exit_policy_reject_private so it also blocks the addresses configured for OutboundBindAddressIPv4_ and OutboundBindAddressIPv6_, and any publicly routable port addresses on exit relays. Add and update unit tests for these functions.
2015-11-20Add unit tests for policies_parse_exit_policy_reject_privateteor (Tim Wilson-Brown)
Test that policies_parse_exit_policy_reject_private rejects supplied IPv4 and IPv6 relay addresses, and the addresses of local interfaces.
2015-11-20Refactor policies_parse_exit_policy_internalteor (Tim Wilson-Brown)
Move the code that rejects publicly routable exit relay addresses to policies_parse_exit_policy_reject_private. Add addr_policy_append_reject_addr_list and use it to reject interface addresses. This removes the duplicate reject checks on local_address and ipv6_local_address, but duplicates will be removed by exit_policy_remove_redundancies at the end of the function. This also removes the info-level logging on rejected interface addresses. Instead, log a debug-level message in addr_policy_append_reject_addr. This simplifies policies_parse_exit_policy_internal and prepares for reporting these addresses over the control port in #17183.
2015-11-19Merge remote-tracking branch 'teor/bug17632-no-ipv4-no-localhost-squashed'Nick Mathewson
2015-11-19Merge remote-tracking branch 'teor/bug17638-ipv6-ersatz-socketpair'Nick Mathewson
2015-11-19Merge remote-tracking branch 'public/decouple_conn_attach_2'Nick Mathewson
2015-11-19Fixup #17638: ignore EINVAL from FreeBSD jails without ::1teor (Tim Wilson-Brown)
In my testing, an IPv6-only FreeBSD jail without ::1 returned EINVAL from tor_ersatz_socketpair. Let's not fail the unit test because of this - it would only ever use tor_socketpair() anyway.
2015-11-19Make tor_ersatz_socketpair work on IPv6-only systemsteor (Tim Wilson-Brown)
(But it won't work on some systems without IPv4/IPv6 localhost (some BSD jails) by design, to avoid creating sockets on routable IP addresses. However, those systems likely have the AF_UNIX socketpair, which tor prefers.) Fixes bug #17638; bugfix on a very early tor version, earlier than 22dba27d8dd5 (23 Nov 2004) / svn:r2943. Patch by "teor".
2015-11-18Merge remote-tracking branch 'teor/bug17632-no-ipv4-no-localhost'Nick Mathewson