Commit Graph

11638 Commits

Author SHA1 Message Date
Nathan Freitas
76d26ae52d Disable OpenSSL engines when building for Android.
Apparently the Android developers dumped OpenSSL's support for hardware
acceleration in order to save some memory, so you can't build programs using
engines on Android.

[Patch revised by nickm]
2009-09-29 00:53:10 -04:00
Nathan Freitas
8c585cce39 Include util.h and log.h as relative paths.
This shouldn't be necessary, but apparently the Android cross-compiler
doesn't respect -I as well as it should.  (-I is supposed to add to the
*front* of the search path.  Android's gcc wrapper apparently likes to add to
the end.  This is broken, but we need to work around it.)
2009-09-29 00:52:52 -04:00
Nick Mathewson
2e70642c3a Whitespace fix 2009-09-28 23:50:57 -04:00
Roger Dingledine
768bc04feb fix two comment bugs for load_stats_file() 2009-09-28 23:25:23 -04:00
Roger Dingledine
b4709066c9 Merge commit 'karsten/fix-another-stats-bug' 2009-09-28 23:23:39 -04:00
Nick Mathewson
3e82981795 Fix some win32 compilation warnings 2009-09-28 19:56:36 -04:00
Karsten Loesing
94b57f9f36 Fix an issue with including stats in extra-info descriptors. 2009-09-28 15:20:21 +02:00
Nick Mathewson
008dc890d8 Improved fix for test_memeq_hex leak.
The earlier fix would only handle the success case.  In the failing
case, test_mem_op does a goto done, which would leave the leak leaking.
2009-09-27 12:07:33 -04:00
Sebastian Hahn
a24b9e6088 Fix a memleak
Found by coverity

test_mem_op_hex was leaking memory, which showed up in a few
tests.

Also, the dir_param test had a memleak of its own.

Found by Coverity
2009-09-27 12:02:35 -04:00
Sebastian Hahn
6a68b50597 Make sure we can't overflow in connection_ap_handshake_send_resolve
Found by Coverity
2009-09-27 12:02:02 -04:00
Nick Mathewson
a4d6d83051 Make a NULL check in test_dir.c non-redundant.
Should quiet a coverity warning.
2009-09-27 12:01:29 -04:00
Sebastian Hahn
7f1f6984da Fix memory leak
Some memory could be lost in the error case of
circuit_build_times_parse_state.

Found by Coverity
2009-09-27 12:00:02 -04:00
Nick Mathewson
0a438c7daf Describe how to regenerate the TLS state name table. 2009-09-25 15:15:06 -04:00
Roger Dingledine
891b3d8633 Merge branch 'master' of ssh://git.torproject.org/git/tor 2009-09-24 19:17:46 -04:00
Roger Dingledine
cbbd6f9263 Revert to the "June 3 2009" ip-to-country file.
The September one seems to have removed most US IP addresses.
2009-09-24 19:15:24 -04:00
Roger Dingledine
180a4b6a74 Merge commit 'karsten/stats-fixes-master' 2009-09-24 18:54:01 -04:00
Karsten Loesing
457bebe01a Fix a couple of smaller issues with gathering statistics.
- Avoid memmoving 0 bytes which might lead to compiler warnings.

- Don't require relays to be entry node AND bridge at the same to time to
  record clients.

- Fix a memory leak when writing dirreq-stats.

- Don't say in the stats files that measurement intervals are twice as long
  as they really are.

- Reduce minimum observation time for requests to 12 hours, or we might
  never record usage.

- Clear exit stats correctly after writing them, or we accumulate old stats
  over time.

- Reset interval start for buffer stats, too.
2009-09-24 21:58:56 +02:00
Nick Mathewson
a3f1da2ec0 Fix compilation on OpenSSLs with unusual state lists.
"Unusual" in this context means "not the same as nickm's."  We should grow a
better list later.

(Also, move TLS state table to a separate header.)
2009-09-24 13:00:28 -04:00
Nick Mathewson
b8b2935367 Debugging logs for TLS handshake
The big change is to add a function to display the current SSL handshake
state, and to log it everywhere reasonable.  (A failure in
SSL23_ST_CR_SRVR_HELLO_A is different from one in
SSL3_ST_CR_SESSION_TICKET_A.)

This patch also adds a new log domain for OR handshaking, so you can pull out
all the handshake log messages without having to run at debug for everything.
For example, you'd just say "log notice-err [handshake]debug-err file
tor.log".
2009-09-24 12:31:22 -04:00
Roger Dingledine
52fa4f6428 Merge commit 'debian-tor-0.2.2.3-alpha-1' 2009-09-23 05:05:45 -04:00
Roger Dingledine
eed5cae9d1 downgrade a log notice at startup
This was the only log notice that happened during other
tor invocations, like --verify-config and --list-fingerprint.
Plus, now we think it works, so no need to hear about it.
2009-09-23 04:59:05 -04:00
Peter Palfrader
c7d0711df2 Merge branch 'debian-merge' into debian
* debian-merge:
  New upstream version
  finishing touches on the changelog
  bump to 0.2.2.3-alpha, plus add a changelog for bug 1103
  Be more robust to bad circwindow values
  Fix Bug 1103.
  Bump version to 0.2.2.2-alpha-dev
2009-09-23 10:33:12 +02:00
Peter Palfrader
3573b36dfc New upstream version 2009-09-23 10:27:56 +02:00
Peter Palfrader
0b2822c7a2 Merge commit 'tor-0.2.2.3-alpha' into debian-merge
* commit 'tor-0.2.2.3-alpha':
  finishing touches on the changelog
  bump to 0.2.2.3-alpha, plus add a changelog for bug 1103
  Be more robust to bad circwindow values
  Fix Bug 1103.
  Bump version to 0.2.2.2-alpha-dev
2009-09-23 10:27:34 +02:00
Nick Mathewson
2d906e6554 Changelog for unit test refactoring. 2009-09-23 00:49:49 -04:00
Nick Mathewson
5f20b0849c Do not distribute tinytest_demo.c in the tarball 2009-09-23 00:24:43 -04:00
Sebastian Hahn
81895dbd52 Our test script moved from src/or/test to src/test/test.
Update the HACKING document and the cross compilation helper
2009-09-23 00:24:43 -04:00
Nick Mathewson
cb52e17d3d Carve out unrelated parts of test_dir_formats 2009-09-23 00:24:43 -04:00
Nick Mathewson
d58a6bb137 Make "make test" depend on "all". 2009-09-23 00:24:43 -04:00
Nick Mathewson
fa693118b1 Split directory tests into their own module.
(Also, clean up some whitespace.)
2009-09-23 00:24:43 -04:00
Nick Mathewson
050545405a Split test_util() into smaller functions. 2009-09-23 00:24:43 -04:00
Nick Mathewson
d9d0813809 Split general util and address tests into their own files. 2009-09-23 00:24:43 -04:00
Nick Mathewson
d2857d524c Split container tests into their own module 2009-09-23 00:24:43 -04:00
Nick Mathewson
cea1225199 Split crypto tests into a separate module. 2009-09-23 00:24:43 -04:00
Sebastian Hahn
410f31e576 Remove a warning on ./autogen.sh 2009-09-23 00:24:43 -04:00
Nick Mathewson
da1aa66f70 Move testing code into new src/test directory. 2009-09-23 00:24:43 -04:00
Nick Mathewson
d4b54549b8 Refactor unit tests to use the tinytest framework.
"Tinytest" is a minimalist C unit testing framework I wrote for
Libevent.  It supports some generally useful features, like being able
to run separate unit tests in their own processes.

I tried to do the refactoring to change test.c as little as possible.
Thus, we mostly don't call the tinytest macros directly.  Instead, the
test.h header is now a wrapper on tinytest.h to make our existing
test_foo() macros work.

The next step(s) here will be:
  - To break test.c into separate files, each with its own test group.
  - To look into which things we can test
  - To refactor the more fiddly tests to use the tinytest macros
    directly and/or run forked.
  - To see about writing unit tests for things we couldn't previously
    test without forking.
2009-09-23 00:24:43 -04:00
Nick Mathewson
1c2d7732f0 Bump version to 0.2.2.3-alpha-dev 2009-09-23 00:24:37 -04:00
Roger Dingledine
0f3417d1db finishing touches on the changelog 2009-09-23 00:13:57 -04:00
Roger Dingledine
8e3af72ed0 bump to 0.2.2.3-alpha, plus add a changelog for bug 1103 2009-09-22 22:15:56 -04:00
Roger Dingledine
0d13e0ed14 Be more robust to bad circwindow values
If the networkstatus consensus tells us that we should use a
negative circuit package window, ignore it. Otherwise we'll
believe it and then trigger an assert.

Also, change the interface for networkstatus_get_param() so we
don't have to lookup the consensus beforehand.
2009-09-22 22:09:33 -04:00
Nick Mathewson
6acfa31d59 Merge commit 'mikeperry/circuittimeout-1103' 2009-09-21 23:35:49 -04:00
Mike Perry
fd7454f9e3 Fix Bug 1103.
Don't pass in a quantile that is too high during pretimeout
calcualtion.
2009-09-21 20:01:20 -07:00
Nick Mathewson
5a9c9aa526 Merge commit 'debian-tor-0.2.2.2-alpha-1' 2009-09-21 16:06:01 -04:00
Nick Mathewson
52b75c9a55 Bump version to 0.2.2.2-alpha-dev 2009-09-21 15:51:08 -04:00
Peter Palfrader
6332c51f73 Build debian's micro-revision into the binary
If we have a debian/micro-revision.i, replace the one in src/or
with our copy so that this will be the revision that ends up in
the binary.  This is an informational only version string, but
it'd be kinda nice if it was (more) accurate nonetheless.

Of course this won't help if people manually patch around but
it's still preferable to claiming we are exactly upstream's source.

If we are building directly out of a git tree, update
debian/micro-revision.i in the clean target.
2009-09-21 14:51:26 +02:00
Peter Palfrader
06211f2b90 Remove common_sha1.i and or_sha1.i in clean
The files src/common/common_sha1.i src/or/or_sha1.i get changed during
the build - they contain the checksums of the individual files that end
up in the binary.  Of couse changes only end up in the debian diff.gz
after building a second time in the same directory.  So, remove those
files in clean to get both a cleaner diff.gz and idempotent builds.
2009-09-21 13:39:40 +02:00
Peter Palfrader
b69f6fe82d Merge branch 'debian-merge' into debian
* debian-merge: (95 commits)
  New upstream version: 0.2.2.2-alpha
  downgrade a log severity, since this event has been known
  Update to the "September 4 2009" ip-to-country file.
  bump to 0.2.2.2-alpha
  Revert "Teach connection_ap_can_use_exit about Exclude*Nodes"
  fix grammar / add changelog for the torify commit
  Fix compile on Snow Leopard
  Fix build warnings on OSX 10.5.8
  Change the condition on the nonlive timeout counting.
  Add a couple of time helper functions.
  Fix typos and comments, plus two bugs
  Implement and document new network liveness algorithm.
  Fix some precision-related asserts in unit tests.
  replace contrib/auto-naming with a readme saying where it went
  clarify our rules for assigning the Named flag
  disable the end of circuitbuildtimeout units tests
  draw in a lot of 0.2.1.20 changelog items into 0.2.2.2-alpha
  Fix compile on freebsd
  Let our config abbreviations rewrite more than once
  a mish-mash of stuff in my sandbox
  ...
2009-09-21 13:16:44 +02:00
Peter Palfrader
20225895a3 New upstream version: 0.2.2.2-alpha 2009-09-21 13:16:05 +02:00
Peter Palfrader
a9c45754e0 Merge commit 'tor-0.2.2.2-alpha' into debian-merge
* commit 'tor-0.2.2.2-alpha': (94 commits)
  downgrade a log severity, since this event has been known
  Update to the "September 4 2009" ip-to-country file.
  bump to 0.2.2.2-alpha
  Revert "Teach connection_ap_can_use_exit about Exclude*Nodes"
  fix grammar / add changelog for the torify commit
  Fix compile on Snow Leopard
  Fix build warnings on OSX 10.5.8
  Change the condition on the nonlive timeout counting.
  Add a couple of time helper functions.
  Fix typos and comments, plus two bugs
  Implement and document new network liveness algorithm.
  Fix some precision-related asserts in unit tests.
  replace contrib/auto-naming with a readme saying where it went
  clarify our rules for assigning the Named flag
  disable the end of circuitbuildtimeout units tests
  draw in a lot of 0.2.1.20 changelog items into 0.2.2.2-alpha
  Fix compile on freebsd
  Let our config abbreviations rewrite more than once
  a mish-mash of stuff in my sandbox
  give proposal 151 a changelog and other touchups
  ...
2009-09-21 13:14:39 +02:00