Commit Graph

151 Commits

Author SHA1 Message Date
Nick Mathewson 12f9c91c06 Merge remote-tracking branch 'origin/maint-0.2.2' 2011-06-03 11:36:21 -04:00
Nick Mathewson bbf2fee8ff Reject 128-byte keys that are not 1024-bit
When we added the check for key size, we required that the keys be
128 bytes.  But RSA_size (which defers to BN_num_bytes) will return
128 for keys of length 1017..1024.  This patch adds a new
crypto_pk_num_bits() that returns the actual number of significant
bits in the modulus, and uses that to enforce key sizes.

Also, credit the original bug3318 in the changes file.
2011-06-03 11:31:19 -04:00
Nick Mathewson 42b15a0aaa Merge remote-tracking branch 'origin/maint-0.2.2' 2011-05-28 01:55:34 -04:00
Nick Mathewson a5232e0c4c Fix GCC 4.6's new -Wunused-but-set-variable warnings.
Most instances were dead code; for those, I removed the assignments.
Some were pieces of info we don't currently plan to use, but which
we might in the future.  For those, I added an explicit cast-to-void
to indicate that we know that the thing's unused.  Finally, one was
a case where we were testing the wrong variable in a unit test.
That one I fixed.

This resolves bug 3208.
2011-05-23 17:04:38 -04:00
Nick Mathewson 4ac8ff9c9f Merge remote-tracking branch 'origin/maint-0.2.2' 2011-05-15 20:22:44 -04:00
Nick Mathewson 3b6cbf2534 Add a function to pull off the final component of a path 2011-05-15 20:20:29 -04:00
Nick Mathewson aa8db013e4 Fixup whitespace issues from 3122 commit in 0.2.3 2011-05-15 20:13:12 -04:00
Nick Mathewson 9fba014e3f Merge remote-tracking branch 'public/bug3122_memcmp_022' into bug3122_memcmp_023
Conflicts in various places, mainly node-related.  Resolved them in
favor of HEAD, with copying of tor_mem* operations from bug3122_memcmp_022.

	src/common/Makefile.am
	src/or/circuitlist.c
	src/or/connection_edge.c
	src/or/directory.c
	src/or/microdesc.c
	src/or/networkstatus.c
	src/or/router.c
	src/or/routerlist.c
	src/test/test_util.c
2011-05-11 16:39:45 -04:00
Nick Mathewson 9964c314c6 fwd-port test_util_di_ops into tinytest format 2011-05-11 16:25:51 -04:00
Sebastian Hahn e36f9d1d9b Link to libevent_openssl statically when requested
When configure tor with --enable-bufferevents and
--enable-static-libevent, libevent_openssl would still be linked
dynamically. Fix this and refactor src/or/Makefile.am along the way.
2011-05-06 15:38:32 +02:00
Nick Mathewson d8cb4f9f0c Use read_all() to read messages from spawn_background
Using read() is an invitation to get some of the data you want, not all.

Possible fix for bug 2462
2011-05-04 23:32:18 -04:00
Nick Mathewson 865d53be54 Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	src/or/microdesc.c
2011-05-03 17:19:35 -04:00
Nick Mathewson 4a7f979b54 Merge remote-tracking branch 'origin/maint-0.2.2' 2011-04-19 12:41:01 -04:00
Nick Mathewson 5cc322e547 Standardize our printf code on %d, not %i. 2011-04-19 12:40:29 -04:00
Nick Mathewson 85ac832a14 Merge remote-tracking branch 'origin/maint-0.2.2' 2011-04-07 20:27:39 -04:00
Gisle Vanem 70e0291468 Use GetTempDir instead of hardcoded path to c:\windows\tmp for unittests 2011-04-07 18:34:11 -04:00
Nick Mathewson b1b6552251 Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts:
	src/common/crypto.c
2011-03-16 17:16:54 -04:00
Nick Mathewson 3310dd2358 Clean up whitespace 2011-03-16 17:11:30 -04:00
Nick Mathewson aaa5737a2e Merge remote branch 'origin/maint-0.2.2' 2011-01-24 17:51:52 -05:00
Nick Mathewson 5ed73e3807 Make the DH parameter we use for TLS match the one from Apache's mod_ssl
Our regular DH parameters that we use for circuit and rendezvous
crypto are unchanged.  This is yet another small step on the path of
protocol fingerprinting resistance.
2011-01-24 16:50:11 -05:00
Roger Dingledine 4ff97e3775 Merge branch 'maint-0.2.2' 2011-01-15 22:39:15 -05:00
Sebastian Hahn 026e7987ad Sanity-check consensus param values
We need to make sure that the worst thing that a weird consensus param
can do to us is to break our Tor (and only if the other Tors are
reliably broken in the same way) so that the majority of directory
authorities can't pull any attacks that are worse than the DoS that
they can trigger by simply shutting down.

One of these worse things was the cbtnummodes parameter, which could
lead to heap corruption on some systems if the value was sufficiently
large.

This commit fixes this particular issue and also introduces sanity
checking for all consensus parameters.
2011-01-15 19:42:17 +01:00
Nick Mathewson 1758ef51de Merge remote branch 'origin/maint-0.2.2' 2011-01-15 13:26:02 -05:00
Nick Mathewson 1393985768 Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
Conflicts:
	src/or/routerparse.c
	src/or/test.c
2011-01-15 13:25:13 -05:00
Nick Mathewson 1b8f2ef550 Merge remote branch 'origin/maint-0.2.2' 2011-01-15 12:03:44 -05:00
Nick Mathewson ed87738ede Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
Conflicts:
	src/or/config.c
	src/or/networkstatus.c
	src/or/rendcommon.c
	src/or/routerparse.c
	src/or/test.c
2011-01-15 12:02:55 -05:00
Nick Mathewson 394a6bf4cd Merge remote branch 'origin/maint-0.2.2' 2011-01-03 12:47:58 -05:00
Nick Mathewson bb5f99d4df Merge remote branch 'sebastian/bug2314' into maint-0.2.2 2011-01-03 12:47:14 -05:00
Nick Mathewson a1ceee193b Bump copyright statements to 2011 (master) 2011-01-03 11:55:01 -05:00
Nick Mathewson 8730884ebe Merge remote branch 'origin/maint-0.2.2' 2011-01-03 11:53:28 -05:00
Nick Mathewson 30b3475e6d Bump copyright statements to 2011 (0.2.2) 2011-01-03 11:52:09 -05:00
Nick Mathewson f1de329e78 Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
Conflicts:
	src/common/test.h
	src/or/test.c
2011-01-03 11:51:17 -05:00
Sebastian Hahn 9ecf133686 Fix compile wanrings revealed by gcc 4.5 on mingw 2010-12-27 09:47:41 +01:00
Karsten Loesing 8db10c6d2f Write bidirectional connection stats in single line.
There's no need to have a separate line conn-stats-end for the end date
and interval length with only a single line conn-bi-direct following.
2010-12-03 16:47:53 +01:00
Karsten Loesing 91fec693e0 Refactor conn stats and add unit tests. 2010-12-03 16:47:53 +01:00
Nick Mathewson 19019f26b0 Merge remote branch 'origin/maint-0.2.2' 2010-11-29 15:30:17 -05:00
Karsten Loesing 4fed43ab2e Report only the top 10 ports in exit-port stats. 2010-11-24 08:45:05 +01:00
Nick Mathewson e361de80bb Merge remote branch 'origin/maint-0.2.2'
Conflicts:
	src/or/router.c
2010-11-19 16:58:22 -05:00
Nick Mathewson a33b338c5b Fix a unit test broken by fix for 2195 2010-11-19 16:50:14 -05:00
Nick Mathewson 223fc208f6 Split long lines in configure.in and Makefile.am files
Having very long single lines with lots and lots of things in them
tends to make files hard to diff and hard to merge.  Since our tools
are one-line-at-a-time, we should try to construct lists that way too,
within reason.

This incidentally turned up a few headers in configure.in that we were
for some reason searching for twice.
2010-11-11 14:22:48 -05:00
Sebastian Hahn 9bed40eb10 Make check-spaces happy 2010-10-14 17:54:45 +02:00
Nick Mathewson 8c837db38f Merge branch 'nodes' 2010-10-13 16:04:25 -04:00
Steven Murdoch 06eafb3fcc Fix running unit tests from outside of the build directory (fixes bug #2051)
Currently the unit tests test_util_spawn_background_* assume that they
are run from the Tor build directory. This is not the case when running
make distcheck, so the test will fail. This problem is fixed by autoconf
setting BUILDDIR to be the root of the Tor build directory, and this
preprocessor variable being used to specify the absolute path to
test-child. Also, in test-child, do not print out argv[0] because this will
no longer be predictable. Found by Sebastian Hahn.
2010-10-11 23:29:52 +01:00
Nick Mathewson 544a8afe5a Merge remote branch 'sjmurdoch/bug1903' 2010-10-11 11:01:15 -04:00
Steven Murdoch f7338d3baa Skip running fgets_eagain test until we fix it 2010-10-11 15:56:14 +01:00
Nick Mathewson 8f76f31761 Make tor_sscanf handle %x 2010-10-11 10:50:47 -04:00
Steven Murdoch 8a12ce2cf9 Add a unit test for tor_spawn_background
- Test sucessfully starting a process
- Test failing to find the executable
2010-10-10 19:08:44 +01:00
Steven Murdoch 8ee559bd63 Add a unit test for fgets (currently fails)
- For a non-blocking pipe, check that on EAGAIN fgets returns NULL
  rather than a partial line
2010-10-10 19:08:44 +01:00
Nick Mathewson 5bab9fe79e Actually add test_microdesc.c file. 2010-10-07 16:27:01 -04:00
Nick Mathewson 3061a036c8 Unit tests for microdescriptor cache
May help with tracking down bug #2022
2010-10-07 15:28:54 -04:00