summaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2013-04-18Use chunks, not buffers, for router descriptorsNick Mathewson
2013-02-19Fix a may-be-used-uninitialized warning.Nick Mathewson
2013-02-19Merge branch 'bug2286_unit_test_squashed'Nick Mathewson
2013-02-19Test alternate values of maxunmeasuredbw tooAndrea Shepard
2013-02-19Update unmeasured bandwidth clipping unit test per NickM's bugfix for the ↵Andrea Shepard
Unmeasured=1 issue
2013-02-19Add unit test for unmeasured bandwidth clipping in consensusAndrea Shepard
2013-02-19Refactor v3_networkstatus test to allow reuse of test for measuredbwAndrea Shepard
2013-02-15Fix unreachable use-before-assign in test_util_join_win_cmdlineNick Mathewson
Apparently there is a compiler that believes this is something to warn about.
2013-02-11Fix a null-deref-on-fail in unit testsNick Mathewson
If geoip_format_bridge_stats() returned NULL when it should have returned a string, we would have tried to deref NULL, and died. Not a big deal in the unit tests, but still worth fixing. Found by coverity; This is CID 743384.
2013-02-11Fix even more dead code and resource leaks in the unit testsNick Mathewson
Found by coverity
2013-02-11Resolve memory leaks in the unit tests and benchmarks (found by coverity)Nick Mathewson
These shouldn't really matter, but it's nice to be leak-free.
2013-02-11Speed up the curve25519 unit test by doing fewer iterationsNick Mathewson
This test was accounting for about 2/3 of our unit tests' runtime, even on systems with a fast curve25519. No test should take so long.
2013-02-08Unit test for tor_weak_random_rangeNick Mathewson
2013-02-07whitespace fixNick Mathewson
2013-02-07Tolerate curve25519 backends where the high bit of the pk isn't ignoredNick Mathewson
Right now, all our curve25519 backends ignore the high bit of the public key. But possibly, others could treat the high bit of the public key as encoding out-of-bounds values, or as something to be preserved. This could be used to distinguish clients with different backends, at the cost of killing a circuit. As a workaround, let's just clear the high bit of each public key indiscriminately before we use it. Fix for bug 8121, reported by rransom. Bugfix on 0.2.4.8-alpha.
2013-02-01Fix a silly mistake in the tor_mathlog() documentation. Give it a unit test.Nick Mathewson
2013-01-29Fix unit test to not expect v2 directory request geoip infoNick Mathewson
When we implemented #5823 and removed v2 directory request info, we never actually changed the unit tests not to expect it. Fixes bug 8084; bug not in any released version of Tor.
2013-01-19Merge remote-tracking branch 'karsten/bug5823'Nick Mathewson
2013-01-17Add a missing part of bug 7311's makefile.nmake tweaksNick Mathewson
Fix by "ultramage". This already has a changes entry.
2013-01-17Remove dirreq-v2-* lines from extra-info descriptors.Karsten Loesing
Implements the rest of #5823.
2013-01-16Implement proposal 204: ignore subdomains in hidden service addressesJérémy Bobbio
The implementation is pretty straightforward: parse_extended_hostname() is modified to drop any leading components from an address like 'foo.aaaaaaaaaaaaaaaa.onion'.
2013-01-16Merge branch '024_msvc_squashed'Nick Mathewson
Conflicts: src/or/or.h srcwin32/orconfig.h
2013-01-16Add more test modules for nmake makefilesNick Mathewson
2013-01-16Try to build tinytest.obj from the right sourcesNick Mathewson
2013-01-16use the /Fe flag with msvcNick Mathewson
Fixes 7309
2013-01-16Add missing targets to src/test/Makefile.nmake. Fix for 7316Nick Mathewson
2013-01-16Add missing includes and libs to makefile.nmakeNick Mathewson
Fixes bugs 7312 and 7310.
2013-01-16Aftermath of isin->contains renamingNick Mathewson
Fix wide lines and comments, and add a changes file
2013-01-16Rename *_isin to *_containsNick Mathewson
This is an automatically generated commit, from the following perl script, run with the options "-w -i -p". s/smartlist_string_num_isin/smartlist_contains_int_as_string/g; s/smartlist_string_isin((?:_case)?)/smartlist_contains_string$1/g; s/smartlist_digest_isin/smartlist_contains_digest/g; s/smartlist_isin/smartlist_contains/g; s/digestset_isin/digestset_contains/g;
2013-01-16Actually link against nacl when we want to use itNick Mathewson
Fixes more of bug 7972
2013-01-16Update the copyright date to 201.Nick Mathewson
2013-01-05Make the = at the end of ntor-onion-key optional.Nick Mathewson
Makes bug 7869 more easily fixable if we ever choose to do so.
2013-01-03Whoops; make that unit test actually pass :/Nick Mathewson
2013-01-03Add a unit test for the curve25519 keypair persistence functionsNick Mathewson
2013-01-03Merge branch 'ntor-resquashed'Nick Mathewson
Conflicts: src/or/cpuworker.c src/or/or.h src/test/bench.c
2013-01-03Implement a constant-time safe_mem_is_zero.Nick Mathewson
2013-01-03Add reference implementation for ntor, plus compatibility testNick Mathewson
Before I started coding ntor in C, I did another one in Python. Turns out, they interoperate just fine.
2013-01-03ntor: Don't fail fast server-side on an unrecognized KEYID(B)Nick Mathewson
2013-01-03Make libcurve25519_donna get built as a .aNick Mathewson
This lets us give it compiler flags differing from the rest of libor-crypto.a
2013-01-03Don't check create cells too much when we're relaying themNick Mathewson
We want to sanity-check our own create cells carefully, and other people's loosely.
2013-01-03Implement scheme to allow ntor requests/responses via older serversNick Mathewson
2013-01-03Code to parse and format CREATE{,2,_FAST} cells and their alliesNick Mathewson
As elsewhere, it makes sense when adding or extending a cell type to actually make the code to parse it into a separate tested function. This commit doesn't actually make anything use these new functions; that's for a later commit.
2013-01-03Massive refactoring of the various handshake typesNick Mathewson
The three handshake types are now accessed from a unified interface; their state is abstracted from the rest of the cpath state, and so on.
2013-01-02Split onion.[ch] into onion{,_fast,_tap}.[ch]Nick Mathewson
I'm going to want a generic "onionskin" type and set of wrappers, and for that, it will be helpful to isolate the different circuit creation handshakes. Now the original handshake is in onion_tap.[ch], the CREATE_FAST handshake is in onion_fast.[ch], and onion.[ch] now handles the onion queue. This commit does nothing but move code and adjust header files.
2013-01-02Refactor strong os-RNG into its own functionNick Mathewson
Previously, we only used the strong OS entropy source as part of seeding OpenSSL's RNG. But with curve25519, we'll have occasion to want to generate some keys using extremely-good entopy, as well as the means to do so. So let's! This patch refactors the OS-entropy wrapper into its own crypto_strongest_rand() function, and makes our new curve25519_secret_key_generate function try it as appropriate.
2013-01-02Implementat the ntor handshakeNick Mathewson
The ntor handshake--described in proposal 216 and in a paper by Goldberg, Stebila, and Ustaoglu--gets us much better performance than our current approach.
2013-01-02Add a wrapper around, and test and build support for, curve25519.Nick Mathewson
We want to use donna-c64 when we have a GCC with support for 64x64->uint128_t multiplying. If not, we want to use libnacl if we can, unless it's giving us the unsafe "ref" implementation. And if that isn't going to work, we'd like to use the portable-and-safe-but-slow 32-bit "donna" implementation. We might need more library searching for the correct libnacl, especially once the next libnacl release is out -- it's likely to have bunches of better curve25519 implementations. I also define a set of curve25519 wrapper functions, though it really shouldn't be necessary. We should eventually make the -donna*.c files get build with -fomit-frame-pointer, since that can make a difference.
2013-01-02Add a data-invariant linear-search map structureNick Mathewson
I'm going to use this for looking op keys server-side for ntor.
2012-12-25Add benchmark for DH handshake and ECDH-P-224/56 handshakeNick Mathewson
2012-12-17Build and test most of the machinery needed for IPv6 virtualaddrmapsNick Mathewson
With an IPv6 virtual address map, we can basically hand out a new IPv6 address for _every_ address we connect to. That'll be cool, and will let us maybe get around prop205 issues. This uses some fancy logic to try to make the code paths in the ipv4 and the ipv6 case as close as possible, and moves to randomly generated addresses so we don't need to maintain those stupid counters that will collide if Tor restarts but apps don't. Also has some XXXX items to fix to make this useful. More design needed.