Commit Graph

128 Commits

Author SHA1 Message Date
Nick Mathewson
5e4d53d535 Remove checks for array existence. (CID 410..415)
In C, the code "char x[10]; if (x) {...}" always takes the true branch of
the if statement.  Coverity notices this now.

In some cases, we were testing arrays to make sure that an operation
we wanted to do would suceed.  Those cases are now always-true.

In some cases, we were testing arrays to see if something was _set_.
Those caes are now tests for strlen(s), or tests for
!tor_mem_is_zero(d,len).
2009-10-26 22:40:41 -04:00
Nick Mathewson
8b2f6b27fd Make signature-generation code handle different key and digest lengths. 2009-10-15 15:17:12 -04:00
Karsten Loesing
ca8708a9ce Fix more of bug 997.
Fix refetching of hidden service descriptors when all introduction points
have turned out to not work.
2009-06-13 12:21:58 +02:00
Karsten Loesing
0d68da2381 Drop version 0 hidserv support on service side. 2009-05-04 13:46:29 -04:00
Karsten Loesing
4ebcc4da34 Update copyright to 2009. 2009-05-02 22:00:54 +02:00
Nick Mathewson
c4b8fef362 Remove svn $Id$s from our source, and remove tor --version --version.
The subversion $Id$ fields made every commit force a rebuild of
whatever file got committed.  They were not actually useful for
telling the version of Tor files in the wild.

svn:r17867
2009-01-04 00:35:51 +00:00
Roger Dingledine
dfc6555ddd switch over the bridge descriptor download mechanism to
use the same download mechanism as other places.

i had to make an ugly hack around "IMPOSSIBLE_TO_DOWNLOAD+1".
we should unhack that sometime.


svn:r17834
2008-12-31 14:19:57 +00:00
Nick Mathewson
45bd6c650d Replace kludgy assert with something a little less awful, and avoid needless strlcpy in rend descriptor encoding.
svn:r17818
2008-12-29 19:57:08 +00:00
Nick Mathewson
5c235cb5ec Fix memory leak in rend_cache_store_v2_desc_as_client(), and refactor the function to use the "goto err" idiom.
svn:r17665
2008-12-18 00:11:49 +00:00
Nick Mathewson
accb4a680f make layer_hint check a little stricter.
svn:r17164
2008-10-27 16:57:18 +00:00
Nick Mathewson
ee31e0829e Verify cpath_layer match on rendezvous cells too. Fixes another case of bug 446. Based on patch from rovv.
svn:r17162
2008-10-27 16:46:45 +00:00
Roger Dingledine
e7f5a07ff4 Make rend_cache_store() use the same return error codes as its v2
equivalent: I got a lonely "Failed to fetch rendezvous descriptor."
in my log file, even when the connection worked.


svn:r17028
2008-10-02 07:32:13 +00:00
Nick Mathewson
8bc1536a9e Add patch 4 from Karsten for proposal 121, slightly modified. Karsten should definitely re-review the bits I changed.
svn:r16955
2008-09-24 14:44:29 +00:00
Nick Mathewson
f95d7c189b Refactor unit test macros and tor_free_all() logic a bit so as to make it easier to free memory on failing tests, in order to suppress scanner warnings and to make dmalloc() usable with tests.
svn:r16816
2008-09-09 20:43:31 +00:00
Roger Dingledine
ef7af1d61e karsten's patch for bug 767.
svn:r16808
2008-09-09 08:41:58 +00:00
Nick Mathewson
0b8117a5c0 Fix numerous memory leaks: some were almost impossible to trigger, and some almost inevitable.
svn:r16779
2008-09-05 20:52:15 +00:00
Roger Dingledine
cc8b2247bf make r16598 compile on 64-bit too
svn:r16604
2008-08-20 05:15:08 +00:00
Karsten Loesing
a8035b5fc3 Update doxygen documentation.
svn:r16599
2008-08-19 19:01:41 +00:00
Nick Mathewson
24f1d29be1 Apply proposal 121 patch 3, with minor tweaks and a few comments.
svn:r16598
2008-08-19 15:41:28 +00:00
Nick Mathewson
960a0f0a99 r17641@31-33-44: nickm | 2008-08-05 16:07:53 -0400
Initial conversion of uint32_t addr to tor_addr_t addr in connection_t and related types.  Most of the Tor wire formats using these new types are in, but the code to generate and use it is not.  This is a big patch.  Let me know what it breaks for you.


svn:r16435
2008-08-05 20:08:19 +00:00
Nick Mathewson
3ce6e2fba2 r17346@aud-055: nickm | 2008-07-24 15:37:19 +0200
Make generic address manipulation functions work better.  Switch address policy code to use tor_addr_t, so it can handle IPv6.  That is a good place to start.


svn:r16178
2008-07-24 13:44:04 +00:00
Roger Dingledine
e9474ed28e if you thought r13604 was a kludge, how about this.
svn:r13605
2008-02-20 00:30:41 +00:00
Roger Dingledine
56a7c9238e be more clear about a possible integer underflow problem. this
should probably be fixed better somehow.


svn:r13604
2008-02-20 00:11:52 +00:00
Roger Dingledine
e0beb6cc5e check return value for crypto_pk_asn1_encode here too. thanks veracode.
svn:r13603
2008-02-19 23:59:16 +00:00
Nick Mathewson
275bb57a77 r18068@catbus: nickm | 2008-02-13 11:33:19 -0500
Patch from karsten: make hidden service code respect SafeLogging.


svn:r13493
2008-02-13 16:34:00 +00:00
Nick Mathewson
842a33ff20 Update some copyright notices: it is now 2008.
svn:r13412
2008-02-07 05:31:47 +00:00
Roger Dingledine
d262fff20d patch "15" from karsten: don't retry a v2 renddesc fetch
if we have a perfectly good v0 renddesc.


svn:r13265
2008-01-24 22:49:14 +00:00
Roger Dingledine
5aa7ce2915 patch from karsten to complain less when a node loses
its hsdir status


svn:r13037
2008-01-06 01:54:09 +00:00
Roger Dingledine
90fcfade4e revert r12841 and r12842, and commit karsten's "patch 13"
svn:r12900
2007-12-21 09:28:22 +00:00
Roger Dingledine
71c84abdff cleanups on r12825
svn:r12826
2007-12-15 20:50:56 +00:00
Roger Dingledine
31324f3e7f apply karsten's "patch 12"
svn:r12825
2007-12-15 20:28:09 +00:00
Roger Dingledine
1d8a8063b9 clean up copyrights, and assign 2007 copyrights to The Tor Project, Inc
svn:r12786
2007-12-12 21:09:01 +00:00
Roger Dingledine
c1b4bfdeac karsten's bugfix on r12607
svn:r12619
2007-11-30 23:45:16 +00:00
Roger Dingledine
aaf35cccf7 karsten's second refactoring patch
svn:r12607
2007-11-29 15:25:04 +00:00
Roger Dingledine
7f12ebc3fa cleanups on r12579
svn:r12580
2007-11-27 21:17:43 +00:00
Roger Dingledine
466abecef4 Our new v2 hidden service descriptor format allows descriptors
that have no introduction points. But Tor crashed when we tried
to build a descriptor with no intro points (and it would have
crashed if we had tried to parse one). Bugfix on 0.2.0.x; patch
by Karsten Loesing.


svn:r12579
2007-11-27 21:06:34 +00:00
Nick Mathewson
bf2717ff3d r14678@tombo: nickm | 2007-11-03 16:12:31 -0400
Try to make hidden service directory lookup functions a bit more efficient: go for fewer O(n) operations, and look at the consensus rather than the routerinfo list.


svn:r12361
2007-11-03 20:12:41 +00:00
Nick Mathewson
832ef9562f r14623@tombo: nickm | 2007-11-01 22:25:18 -0400
More tweaks from karsten, with some cleanup and commentary.


svn:r12319
2007-11-02 02:25:28 +00:00
Roger Dingledine
e5ec8248e8 make r12272 compile on 64-bit
svn:r12315
2007-11-01 13:48:12 +00:00
Nick Mathewson
d1df046e3b r16314@catbus: nickm | 2007-10-31 23:40:08 -0400
Clients download and cache new hidden descriptor format.


svn:r12302
2007-11-01 03:43:02 +00:00
Nick Mathewson
779b615bc2 r16300@catbus: nickm | 2007-10-31 15:36:41 -0400
Next patch from Karsten:  rename some macros, tunnel dir connections, generate (and upload) multiple descriptors as appropriate.


svn:r12299
2007-10-31 20:48:06 +00:00
Nick Mathewson
024798ee4c r16263@catbus: nickm | 2007-10-29 15:08:17 -0400
Tidy last patch a bit.


svn:r12273
2007-10-29 19:10:47 +00:00
Nick Mathewson
e136f00ca8 r16262@catbus: nickm | 2007-10-29 13:21:35 -0400
Patch from Karsten: Code to act as (and use) v2 hidden service directories.


svn:r12272
2007-10-29 19:10:42 +00:00
Nick Mathewson
d94a978b32 r16237@catbus: nickm | 2007-10-28 15:45:25 -0400
Tidy v2 hidden service descriptor format code: fix memory leaks, fix reference problems, note magic numbers, note questions, remove redundant checks, remove a possible stack smashing bug when encoding a descriptor with no protocols supported.


svn:r12255
2007-10-28 19:48:16 +00:00
Nick Mathewson
c58675ca72 r16236@catbus: nickm | 2007-10-28 14:36:30 -0400
Patch from Karsten Loesing: encode and parse v2 rendezvous descriptors.


svn:r12254
2007-10-28 19:48:14 +00:00
Roger Dingledine
2a2cee9e51 Start using the v2 intro format for hidden service connections. Now
clients specify their chosen rendezvous point by identity digest
rather than by (potentially ambiguous) nickname. This change could
speed up hidden service connections dramatically.


svn:r11499
2007-09-18 23:48:39 +00:00
Roger Dingledine
82da6c02ba clean up r11496
svn:r11498
2007-09-18 23:34:27 +00:00
Roger Dingledine
eb9dc12ce9 Drop support for v1 rendezvous descriptors, since we never used
them anyway, and the code has probably rotted by now. Based on
patch from Karsten Loesing.


svn:r11496
2007-09-18 21:17:45 +00:00
Nick Mathewson
2ff871e530 r14871@catbus: nickm | 2007-08-31 10:12:53 -0400
Check correct circuit type when calling functions from rend_process_relay_cell. Backport candidate.


svn:r11336
2007-08-31 14:20:44 +00:00
Roger Dingledine
d112e7b1ad fix some code comments, a wrapper, and add a todo item
svn:r10111
2007-05-04 07:24:01 +00:00