aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-03Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-10-03Merge remote-tracking branch 'public/bug13325_024' into maint-0.2.5Nick Mathewson
2014-10-03Run correctly on OpenBSD systems without SSL_METHOD.get_cipher_by_charNick Mathewson
Also, make sure we will compile correctly on systems where they finally rip it out. Fixes issue #13325. Caused by this openbsd commit: ​http://marc.info/?l=openbsd-cvs&m=140768179627976&w=2 Reported by Fredzupy.
2014-09-29Clear the cached address from resolve_my_address() when our IP changesNick Mathewson
Closes 11582; patch from "ra".
2014-09-29continue our habit of specifying the default in the manpageRoger Dingledine
2014-09-29Merge remote-tracking branch 'origin/maint-0.2.5'Nick Mathewson
2014-09-29Merge branch 'bug13295_v2_025' into maint-0.2.5Nick Mathewson
2014-09-29Don't use the getaddrinfo sandbox cache from tor-resolveNick Mathewson
Fixes bug 13295; bugfix on 0.2.5.3-alpha. The alternative here is to call crypto_global_init() from tor-resolve, but let's avoid linking openssl into tor-resolve for as long as we can.
2014-09-29Automake syntax error :/Nick Mathewson
2014-09-29Add missing ed25519_ref10 headers to NOINST_HEADERS.Nick Mathewson
2014-09-29Note when 13290 was introduced.Nick Mathewson
2014-09-29Merge remote-tracking branch 'teor/circuitstats-pareto-avoid-div-zero'Nick Mathewson
2014-09-29Note when 13291 was introduced.Nick Mathewson
2014-09-29Whitespace fixes on 13291 fixNick Mathewson
2014-09-29Parenthesize macro arguments for 13291 fixNick Mathewson
2014-09-29Stop spawn test failures due to a race condition with SIGCHLD on process exitteor
When a spawned process forks, fails, then exits very quickly, (this typically occurs when exec fails), there is a race condition between the SIGCHLD handler updating the process_handle's fields, and checking the process status in those fields. The update can occur before or after the spawn tests check the process status. We check whether the process is running or not running (rather than just checking if it is running) to avoid this issue.
2014-09-29Merge branch 'bug12971_take2_squashed'Nick Mathewson
2014-09-29Rename socks5 error code setting function againNick Mathewson
I'd prefer not to use the name "send" for any function that doesn't really send things.
2014-09-29Respond with 'Command not supported' SOCKS5 reply message upon reception of ↵rl1987
unsupported request.
2014-09-29Merge branch 'ticket961_squashed'Nick Mathewson
2014-09-29Changes file for ticket 961Nick Mathewson
2014-09-29Avoid frequent strcmp() calls for AccountingRuleNick Mathewson
Generally, we don't like to parse the same thing over and over; it's best IMO to do it once at the start of the code.
2014-09-29Add an "AccountingRule" feature to permit limiting bw usage by read+writeNick Mathewson
Patch from "chobe". Closes ticket 961.
2014-09-29Merge remote-tracking branch 'yawning/bug13213'Nick Mathewson
2014-09-29Merge remote-tracking branch 'rl1987/bug13228'Nick Mathewson
2014-09-29Whitespace fixesNick Mathewson
2014-09-29Avoid division by zero in circuitstats paretoteor
In circuit_build_times_calculate_timeout() in circuitstats.c, avoid dividing by zero in the pareto calculations. If either the alpha or p parameters are 0, we would divide by zero, yielding an infinite result; which would be clamped to INT32_MAX anyway. So rather than dividing by zero, we just skip the offending calculation(s), and use INT32_MAX for the result. Division by zero traps under clang -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error.
2014-09-29Stop test & bench build failures with --disable-curve25519teor
Ensure test & bench code that references curve25519 is disabled by the appropriate macros. tor now builds with and without --disable-curve25519.
2014-09-28Merge branch 'bug13280'Nick Mathewson
2014-09-28Stop spurious clang shallow analysis null pointer errorsteor
Avoid 4 null pointer errors under clang shallow analysis (the default when building under Xcode) by using tor_assert() to prove that the pointers aren't null. Resolves issue 13284 via minor code refactoring.
2014-09-28Stop ed25519 8-bit signed left shift overflowingteor
Standardise usage in ge_scalarmult_base.c for 1 new fix.
2014-09-28Use SHL{8,32,64} in ed25519/ref10 to avoid left-shifting negative valuesNick Mathewson
This helps us avoid undefined behavior. It's based on a patch from teor, except that I wrote a perl script to regenerate the patch: #!/usr/bin/perl -p -w -i BEGIN { %vartypes = (); } if (/^[{}]/) { %vartypes = (); } if (/^ *crypto_int(\d+) +([a-zA-Z_][_a-zA-Z0-9]*)/) { $vartypes{$2} = $1; } elsif (/^ *(?:signed +)char +([a-zA-Z_][_a-zA-Z0-9]*)/) { $vartypes{$1} = '8'; } # This fixes at most one shift per line. But that's all the code does. if (/([a-zA-Z_][a-zA-Z_0-9]*) *<< *(\d+)/) { $v = $1; if (exists $vartypes{$v}) { s/$v *<< *(\d+)/SHL$vartypes{$v}($v,$1)/; } } # remove extra parenthesis s/\(SHL64\((.*)\)\)/SHL64\($1\)/; s/\(SHL32\((.*)\)\)/SHL32\($1\)/; s/\(SHL8\((.*)\)\)/SHL8\($1\)/;
2014-09-28Stop signed left shifts overflowing in ed25519: Macrosteor
The macros let us use unsigned types for potentially overflowing left shifts. Create SHL32() and SHL64() and SHL8() macros for convenience.
2014-09-28Improving error message.rl1987
2014-09-26Merge remote-tracking branch 'public/require_some_c99'Nick Mathewson
2014-09-26Avoid a "constant variable guards dead code" warning from coverityNick Mathewson
Fixes CID 752028
2014-09-26Regenerate pwbox.c with the latest trunnelNick Mathewson
This one should no longer generate dead-code warnings with coverity. Fingers crossed? This was CID 1241498
2014-09-26Comment-out dead code in ed25519/ref10Nick Mathewson
There are some loops of the form for (i=1;i<1;++i) ... And of course, if the loop index is initialized to 1, it will never be less than 1, and the loop body will never be executed. This upsets coverity. Patch fixes CID 1221543 and 1221542
2014-09-26Check key_len in secret_to_key_new()Nick Mathewson
This bug shouldn't be reachable so long as secret_to_key_len and secret_to_key_make_specifier stay in sync, but we might screw up someday. Found by coverity; this is CID 1241500
2014-09-26Fix a double-free in failing case of handle_control_authenticate.Nick Mathewson
Bugfix on ed8f020e205267e6270494634346ab68d830e1d8; bug not in any released version of Tor. Found by Coverity; this is CID 1239290. [Yes, I used this commit message before, in 58e813d0fcfcecfc2017. Turns out, that fix wasn't right, since I didn't look up a screen. :P ]
2014-09-25Fix on that last fix.Nick Mathewson
2014-09-25Fix warnings on 32-bit builds.Nick Mathewson
When size_t is the most memory you can have, make sure that things referring to real parts of memory are size_t, not uint64_t or off_t. But not on any released Tor.
2014-09-25Merge branch 'ed25519_ref10_squashed'Nick Mathewson
Conflicts: src/common/include.am src/ext/README
2014-09-25Comments and tweaks based on review by asnNick Mathewson
Add some documentation Rename "derive" -> "blind" Check for failure on randombytes().
2014-09-25Add benchmarks for ed25519 functionsNick Mathewson
2014-09-25Add comments to ed25519_vectors.incNick Mathewson
2014-09-25Cut the time to run the python ed25519 tests by a factor of ~6Nick Mathewson
I know it's pointless to optimize them, but I just can't let them spend all that time in expmod() when native python pow() does the same thing.
2014-09-25Add a reference implementation of our ed25519 modificationsNick Mathewson
Also, use it to generate test vectors, and add those test vectors to test_crypto.c This is based on ed25519.py from the ed25519 webpage; the kludgy hacks are my own.
2014-09-25Add the pure-python ed25519 implementation, for testing.Nick Mathewson
2014-09-25More documentation for ed25519 stuff.Nick Mathewson