]> git.ipfire.org Git - thirdparty/tor.git/log
thirdparty/tor.git
13 years agonickname, not identity fingerprint, will help more
Roger Dingledine [Sun, 8 Jan 2012 17:09:01 +0000 (12:09 -0500)] 
nickname, not identity fingerprint, will help more

13 years agotell me who votes are actually for, not just where they're from
Roger Dingledine [Sun, 8 Jan 2012 15:03:46 +0000 (10:03 -0500)] 
tell me who votes are actually for, not just where they're from

13 years agoadd a note from wanoskarnet
Roger Dingledine [Sun, 8 Jan 2012 14:03:03 +0000 (09:03 -0500)] 
add a note from wanoskarnet

he disagrees about what the code that we decided not to use would do

13 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Thu, 5 Jan 2012 19:16:30 +0000 (14:16 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

13 years agoMerge branch 'bug4822_021_v2_squashed' into maint-0.2.1
Nick Mathewson [Thu, 5 Jan 2012 19:11:42 +0000 (14:11 -0500)] 
Merge branch 'bug4822_021_v2_squashed' into maint-0.2.1

13 years agoLog at info level when disabling SSLv3
Robert Ransom [Thu, 5 Jan 2012 04:41:28 +0000 (20:41 -0800)] 
Log at info level when disabling SSLv3

13 years agoAdd a changes file for bug4822
Nick Mathewson [Thu, 5 Jan 2012 02:17:52 +0000 (21:17 -0500)] 
Add a changes file for bug4822

13 years agoDisable SSLv3 when using a not-up-to-date openssl
Nick Mathewson [Wed, 4 Jan 2012 22:15:50 +0000 (17:15 -0500)] 
Disable SSLv3 when using a not-up-to-date openssl

This is to address bug 4822, and CVE-2011-4576.

13 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Thu, 5 Jan 2012 11:45:28 +0000 (06:45 -0500)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

13 years agoadd a changes file for ticket 4825
Roger Dingledine [Thu, 5 Jan 2012 11:42:26 +0000 (06:42 -0500)] 
add a changes file for ticket 4825

13 years agoUpdate to the January 2012 GeoIP database.
Karsten Loesing [Thu, 5 Jan 2012 10:10:57 +0000 (11:10 +0100)] 
Update to the January 2012 GeoIP database.

13 years agoFix spelling in a controlsocket log msg
Sebastian Hahn [Fri, 30 Dec 2011 17:06:41 +0000 (18:06 +0100)] 
Fix spelling in a controlsocket log msg

Fixes bug 4803.

13 years agoMerge remote-tracking branch 'public/bug4788' into maint-0.2.2
Nick Mathewson [Wed, 28 Dec 2011 21:50:45 +0000 (16:50 -0500)] 
Merge remote-tracking branch 'public/bug4788' into maint-0.2.2

13 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Wed, 28 Dec 2011 20:56:37 +0000 (15:56 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

13 years agoBug 4786 fix: don't convert EARLY to RELAY on v1 connections
Nick Mathewson [Tue, 27 Dec 2011 21:41:25 +0000 (16:41 -0500)] 
Bug 4786 fix: don't convert EARLY to RELAY on v1 connections

We used to do this as a workaround for older Tors, but now it's never
the correct thing to do (especially since anything that didn't
understand RELAY_EARLY is now deprecated hard).

13 years agoAuthorities reject insecure Tors.
Nick Mathewson [Wed, 28 Dec 2011 02:47:04 +0000 (21:47 -0500)] 
Authorities reject insecure Tors.

This patch should make us reject every Tor that was vulnerable to
CVE-2011-0427.  Additionally, it makes us reject every Tor that couldn't
handle RELAY_EARLY cells, which helps with proposal 110 (#4339).

13 years agoProvide correct timeradd/timersup replacements
Sebastian Hahn [Sun, 25 Dec 2011 22:19:08 +0000 (23:19 +0100)] 
Provide correct timeradd/timersup replacements

Bug caught and patch provided by Vektor. Fixes bug 4778.t

13 years agoDo not even try to keep going on a socket with socklen==0
Nick Mathewson [Mon, 19 Dec 2011 19:37:52 +0000 (14:37 -0500)] 
Do not even try to keep going on a socket with socklen==0

Back in #1240, r1eo linked to information about how this could happen
with older Linux kernels in response to nmap.  Bugs #4545 and #4547
are about how our approach to trying to deal with this condition was
broken and stupid.  Thanks to wanoskarnet for reminding us about #1240.

This is a fix for the abovementioned bugs, and is a bugfix on
0.1.0.3-rc.

13 years agoMerge remote-tracking branch 'sebastian/clang-3.0-fixes_022' into maint-0.2.2
Nick Mathewson [Fri, 16 Dec 2011 22:49:41 +0000 (17:49 -0500)] 
Merge remote-tracking branch 'sebastian/clang-3.0-fixes_022' into maint-0.2.2

13 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Thu, 15 Dec 2011 16:28:44 +0000 (11:28 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

13 years agoAdd a fix for the buf_pullup bug that Vektor reported
Nick Mathewson [Wed, 14 Dec 2011 21:38:43 +0000 (16:38 -0500)] 
Add a fix for the buf_pullup bug that Vektor reported

13 years agoBuild with warnings and clang 3.0
Sebastian Hahn [Mon, 12 Dec 2011 14:36:08 +0000 (15:36 +0100)] 
Build with warnings and clang 3.0

--enable-gcc-warnings enables two warnings that clang doesn't support,
so the build fails. We had hoped clang 3.0 would add those, but it
didn't, so let's just always disable those warnings when building with
clang. We can still fix it later once they add support

13 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Thu, 8 Dec 2011 09:40:15 +0000 (04:40 -0500)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

13 years agoUpdate to the December 2011 GeoIP database.
Karsten Loesing [Thu, 8 Dec 2011 08:55:44 +0000 (09:55 +0100)] 
Update to the December 2011 GeoIP database.

13 years agoDon't call tor_tls_set_logged_address till after checking conn->tls
Nick Mathewson [Fri, 2 Dec 2011 21:15:52 +0000 (16:15 -0500)] 
Don't call tor_tls_set_logged_address till after checking conn->tls

Fixes bug 4531; partial backport of e27a26d5.

13 years agotor_accept_socket() should take tor_addr_t for listener arg
Nick Mathewson [Fri, 2 Dec 2011 21:09:16 +0000 (16:09 -0500)] 
tor_accept_socket() should take tor_addr_t for listener arg

Fixes bug 4535; bugfix on 0.2.2.28-beta; found by "troll_un"

13 years agoFix bug 4530; check return val of tor_addr_lookup correctly
Nick Mathewson [Fri, 2 Dec 2011 20:37:24 +0000 (15:37 -0500)] 
Fix bug 4530; check return val of tor_addr_lookup correctly

Fix on 0.2.1.5-alpha; reported by troll_un

13 years agoDetect tor_addr_to_str failure in tor_dup_addr.
Nick Mathewson [Thu, 24 Nov 2011 04:04:10 +0000 (23:04 -0500)] 
Detect tor_addr_to_str failure in tor_dup_addr.

This avoids a possible strdup of an uninitialized buffer.

Fixes 4529; fix on 0.2.1.3-alpha; reported by troll_un.

13 years agoMerge remote-tracking branch 'public/bug4230' into maint-0.2.2
Nick Mathewson [Wed, 23 Nov 2011 21:22:26 +0000 (16:22 -0500)] 
Merge remote-tracking branch 'public/bug4230' into maint-0.2.2

13 years agoFix a compile warning on 64bit OS X
Sebastian Hahn [Wed, 23 Nov 2011 00:41:37 +0000 (01:41 +0100)] 
Fix a compile warning on 64bit OS X

Backport of 68475fc5c5a806ebbb5657de1667dab2c3e09b7c which accidentally
only made it into master. Fixes bug 4547. Bug isn't in any released
version.

13 years agoman page entries for AuthDir{Fast,GuardBW}Guarantee
Roger Dingledine [Mon, 21 Nov 2011 23:32:32 +0000 (18:32 -0500)] 
man page entries for AuthDir{Fast,GuardBW}Guarantee

13 years agoparameterize bw cutoffs to guarantee Fast and Guard flags
Roger Dingledine [Thu, 17 Nov 2011 01:55:33 +0000 (20:55 -0500)] 
parameterize bw cutoffs to guarantee Fast and Guard flags

Now it will be easier for researchers to simulate Tor networks with
different values. Resolves ticket 4484.

13 years agoMerge branch 'bug4518' into maint-0.2.2
Nick Mathewson [Mon, 21 Nov 2011 22:25:51 +0000 (17:25 -0500)] 
Merge branch 'bug4518' into maint-0.2.2

13 years agoMerge remote-tracking branch 'public/bug3963' into maint-0.2.2
Nick Mathewson [Mon, 21 Nov 2011 15:52:15 +0000 (10:52 -0500)] 
Merge remote-tracking branch 'public/bug3963' into maint-0.2.2

13 years agoChanges file for bug4521 backports.
Nick Mathewson [Mon, 21 Nov 2011 01:15:13 +0000 (20:15 -0500)] 
Changes file for bug4521 backports.

13 years agoSockets are unsigned on windows
Sebastian Hahn [Tue, 9 Aug 2011 08:59:03 +0000 (10:59 +0200)] 
Sockets are unsigned on windows

this gets rid of a warning about signed/unsigned comparison

This is a backport of 0a5338e03cdf14ef80584c6ff8adeb49200b8a76 that
accidentally only went into master

13 years agoGet rid of an unused parameter warning on win
Sebastian Hahn [Tue, 9 Aug 2011 09:00:25 +0000 (11:00 +0200)] 
Get rid of an unused parameter warning on win

This is a backport of bed79c47f4ec0ee72b19e2b81c54131d516d07ef which
accidentally only went into master

13 years agoOnly call cull_wedged_cpuworkers once every 60 seconds.
Nick Mathewson [Sat, 19 Nov 2011 23:29:42 +0000 (18:29 -0500)] 
Only call cull_wedged_cpuworkers once every 60 seconds.

The function is over 10 or 20% on some of Moritz's profiles, depending
on how you could.

Since it's checking for a multi-hour timeout, this is safe to do.

Fixes bug 4518.

13 years agoDon't log about stats when running as a client without geoip
Sebastian Hahn [Fri, 18 Nov 2011 23:50:03 +0000 (00:50 +0100)] 
Don't log about stats when running as a client without geoip

Completely disable stats if we aren't running as a relay. We won't
collect any anyway, so setting up the infrastructure for them and
logging about them is wrong. This also removes a confusing log
message that clients without a geoip db would have seen.

Fixes bug 4353.

13 years agoMerge branch 'bug4457_022' into maint-0.2.2
Nick Mathewson [Wed, 16 Nov 2011 21:22:47 +0000 (16:22 -0500)] 
Merge branch 'bug4457_022' into maint-0.2.2

13 years agoUse real_addr in send_netinfo
Nick Mathewson [Tue, 15 Nov 2011 03:42:10 +0000 (22:42 -0500)] 
Use real_addr in send_netinfo

Reported by "troll_un"; bugfix on 0.2.0.10-alpha; fixes bug 4349.

13 years agoDetect failure from event_init() or event_base_new_with_config()
Nick Mathewson [Mon, 14 Nov 2011 22:53:45 +0000 (17:53 -0500)] 
Detect failure from event_init() or event_base_new_with_config()

13 years agoUse the EVENT_BASE_FLAG_NOLOCK flag to prevent socketpair() invocation
Nick Mathewson [Mon, 14 Nov 2011 22:46:43 +0000 (17:46 -0500)] 
Use the EVENT_BASE_FLAG_NOLOCK flag to prevent socketpair() invocation

In Tor 0.2.2, we never need the event base to be notifiable, since we
don't call it from other threads.  This is a workaround for bug 4457,
which is not actually a Tor bug IMO.

13 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Mon, 14 Nov 2011 16:10:27 +0000 (11:10 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

13 years agoMerge remote-tracking branch 'karsten/geoip-november2011' into maint-0.2.1
Nick Mathewson [Mon, 14 Nov 2011 16:10:10 +0000 (11:10 -0500)] 
Merge remote-tracking branch 'karsten/geoip-november2011' into maint-0.2.1

14 years agoCorrect the handling of overflow behavior in smartlist_ensure_capacity
Nick Mathewson [Wed, 9 Nov 2011 17:08:28 +0000 (12:08 -0500)] 
Correct the handling of overflow behavior in smartlist_ensure_capacity

The old behavior was susceptible to the compiler optimizing out our
assertion check, *and* could still overflow size_t on 32-bit systems
even when it did work.

14 years agoMerge remote-tracking branch 'rransom-tor/bug4426' into maint-0.2.2
Nick Mathewson [Wed, 9 Nov 2011 16:03:20 +0000 (11:03 -0500)] 
Merge remote-tracking branch 'rransom-tor/bug4426' into maint-0.2.2

14 years agoDon't warn when compiling with --disable-threads
Sebastian Hahn [Tue, 8 Nov 2011 07:09:40 +0000 (08:09 +0100)] 
Don't warn when compiling with --disable-threads

STMT_VOID semantics suggested by nick, thanks!

14 years agoInclude HiddenServiceDir in some warning messages
Robert Ransom [Tue, 8 Nov 2011 01:02:50 +0000 (17:02 -0800)] 
Include HiddenServiceDir in some warning messages

14 years agoRobert says that this bug was not in fact one of frosty's
Nick Mathewson [Mon, 7 Nov 2011 16:54:54 +0000 (11:54 -0500)] 
Robert says that this bug was not in fact one of frosty's

14 years agoMerge branch 'bug4424' into maint-0.2.2
Nick Mathewson [Mon, 7 Nov 2011 16:47:28 +0000 (11:47 -0500)] 
Merge branch 'bug4424' into maint-0.2.2

14 years agoRemove an extraneous "if" in the 4424 fix
Nick Mathewson [Mon, 7 Nov 2011 16:46:51 +0000 (11:46 -0500)] 
Remove an extraneous "if" in the 4424 fix

14 years agoDon't leak an extend_info_t in rend_client_any_intro_points_usable
Robert Ransom [Mon, 7 Nov 2011 16:35:51 +0000 (08:35 -0800)] 
Don't leak an extend_info_t in rend_client_any_intro_points_usable

14 years agoMerge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2
Nick Mathewson [Mon, 7 Nov 2011 15:42:34 +0000 (10:42 -0500)] 
Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2

14 years agoUpdate to the November 2011 GeoIP database.
Karsten Loesing [Mon, 7 Nov 2011 13:23:48 +0000 (14:23 +0100)] 
Update to the November 2011 GeoIP database.

14 years agoAdd a changes file for 4410
Sebastian Hahn [Sun, 6 Nov 2011 16:24:09 +0000 (17:24 +0100)] 
Add a changes file for 4410

14 years agoFix remotely triggerable assert during ip decryption
Dan Rosenberg [Sun, 6 Nov 2011 16:23:14 +0000 (17:23 +0100)] 
Fix remotely triggerable assert during ip decryption

Fixes bug 4410.

14 years agoMerge branch 'bug4383_nm' into maint-0.2.2
Nick Mathewson [Thu, 3 Nov 2011 17:23:59 +0000 (13:23 -0400)] 
Merge branch 'bug4383_nm' into maint-0.2.2

14 years agoFix a memleak when fetching descriptors for bridges in ExcludeNodes.
George Kadianakis [Thu, 3 Nov 2011 16:16:31 +0000 (17:16 +0100)] 
Fix a memleak when fetching descriptors for bridges in ExcludeNodes.

14 years agoMerge remote-tracking branch 'erinn/win-bundle-fix' into maint-0.2.2
Nick Mathewson [Mon, 31 Oct 2011 01:28:19 +0000 (21:28 -0400)] 
Merge remote-tracking branch 'erinn/win-bundle-fix' into maint-0.2.2

14 years agoremove absolute path from contrib/package_nsis-mingw.sh in order to make it easier...
Erinn Clark [Mon, 31 Oct 2011 00:52:52 +0000 (00:52 +0000)] 
remove absolute path from contrib/package_nsis-mingw.sh in order to make it easier to automatically build tor expert bundle

14 years agoAdd a changes file for the 4340 fix
Sebastian Hahn [Sat, 29 Oct 2011 09:21:37 +0000 (11:21 +0200)] 
Add a changes file for the 4340 fix

14 years agoDisable stats requiring geoip info if we have none
Sebastian Hahn [Wed, 22 Dec 2010 07:34:41 +0000 (08:34 +0100)] 
Disable stats requiring geoip info if we have none

In other parts of the code we will otherwise attempt to collect these
statistics, and that will lead to crashes.

14 years agoDiscard all cells on a marked connection
Nick Mathewson [Fri, 28 Oct 2011 21:04:15 +0000 (17:04 -0400)] 
Discard all cells on a marked connection

Fix for bug 4299

14 years agoFix typo, spotted by tmpname0901. Thanks!
Sebastian Hahn [Fri, 28 Oct 2011 09:19:16 +0000 (11:19 +0200)] 
Fix typo, spotted by tmpname0901. Thanks!

14 years agobump maint-0.2.2 to 0.2.2.34-dev
Roger Dingledine [Fri, 28 Oct 2011 00:50:48 +0000 (20:50 -0400)] 
bump maint-0.2.2 to 0.2.2.34-dev

14 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Fri, 28 Oct 2011 00:03:21 +0000 (20:03 -0400)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

14 years agobump maint to 0.2.1.31
Roger Dingledine [Fri, 28 Oct 2011 00:01:58 +0000 (20:01 -0400)] 
bump maint to 0.2.1.31

14 years agoAdd option to give guard flag to relays without the CVE-2011-2768 fix
Robert Ransom [Tue, 25 Oct 2011 19:33:21 +0000 (12:33 -0700)] 
Add option to give guard flag to relays without the CVE-2011-2768 fix

This way, all of the DA operators can upgrade immediately, without nuking
every client's set of entry guards as soon as a majority of them upgrade.

Until enough guards have upgraded, a majority of dirauths should set this
config option so that there are still enough guards in the network. After
a few days pass, all dirauths should use the default.

14 years agoDon't give the Guard flag to relays without the CVE-2011-2768 fix
Robert Ransom [Tue, 25 Oct 2011 07:24:15 +0000 (00:24 -0700)] 
Don't give the Guard flag to relays without the CVE-2011-2768 fix

14 years agoMake tor_version_same_series non-static
Robert Ransom [Tue, 25 Oct 2011 06:36:57 +0000 (23:36 -0700)] 
Make tor_version_same_series non-static

14 years agoMerge branch 'maint-0.2.1_secfix' into maint-0.2.2_secfix
Sebastian Hahn [Wed, 26 Oct 2011 21:30:27 +0000 (23:30 +0200)] 
Merge branch 'maint-0.2.1_secfix' into maint-0.2.2_secfix

Conflicts:
src/or/connection_or.c

14 years agoReject create cells on outgoing OR connections from bridges
Robert Ransom [Sun, 23 Oct 2011 22:21:49 +0000 (15:21 -0700)] 
Reject create cells on outgoing OR connections from bridges

14 years agoMark which OR connections are outgoing
Robert Ransom [Sun, 23 Oct 2011 21:58:00 +0000 (14:58 -0700)] 
Mark which OR connections are outgoing

14 years agoDon't use any OR connection which sent us a CREATE_FAST cell for an EXTEND
Robert Ransom [Sun, 23 Oct 2011 21:27:56 +0000 (14:27 -0700)] 
Don't use any OR connection which sent us a CREATE_FAST cell for an EXTEND

Fix suggested by Nick Mathewson.

14 years agoDon't send a certificate chain on outgoing TLS connections from non-relays
Nick Mathewson [Sun, 23 Oct 2011 16:06:06 +0000 (16:06 +0000)] 
Don't send a certificate chain on outgoing TLS connections from non-relays

14 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Wed, 26 Oct 2011 21:14:39 +0000 (17:14 -0400)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

14 years agoRemove the -F option from tor-resolve.
Nick Mathewson [Mon, 23 May 2011 20:59:41 +0000 (16:59 -0400)] 
Remove the -F option from tor-resolve.

It used to mean "Force": it would tell tor-resolve to ask tor to
resolve an address even if it ended with .onion.  But when
AutomapHostsOnResolve was added, automatically refusing to resolve
.onion hosts stopped making sense.  So in 0.2.1.16-rc (commit
298dc95dfd8), we made tor-resolve happy to resolve anything.

The -F option stayed in, though, even though it didn't do anything.
Oddly, it never got documented.

Found while fixing GCC 4.6 "set, unused variable" warnings.

14 years agomanually backport a5232e0c4c
Roger Dingledine [Wed, 26 Oct 2011 21:11:52 +0000 (17:11 -0400)] 
manually backport a5232e0c4c

14 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Wed, 26 Oct 2011 20:34:45 +0000 (16:34 -0400)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

14 years agostop asserting at boot
Roger Dingledine [Tue, 31 May 2011 03:50:37 +0000 (23:50 -0400)] 
stop asserting at boot

The patch for 3228 made us try to run init_keys() before we had loaded
our state file, resulting in an assert inside init_keys. We had moved
it too early in the function.

Now it's later in the function, but still above the accounting calls.

14 years agoReinit keys at the start of options_act().
Nick Mathewson [Mon, 23 May 2011 20:38:35 +0000 (16:38 -0400)] 
Reinit keys at the start of options_act().

Previously we did this nearer to the end (in the old_options &&
transition_affects_workers() block).  But other stuff cares about
keys being consistent with options... particularly anything which
tries to access a key, which can die in assert_identity_keys_ok().

Fixes bug 3228; bugfix on 0.2.2.18-alpha.

Conflicts:

src/or/config.c

14 years agoDon't crash a bridge authority on SIGHUP if it's not in the consensus
Robert Ransom [Wed, 16 Feb 2011 12:12:37 +0000 (04:12 -0800)] 
Don't crash a bridge authority on SIGHUP if it's not in the consensus

Fixes bug 2572.

14 years agoFix assert for relay/bridge state change
Sebastian Hahn [Tue, 25 Jan 2011 14:28:58 +0000 (15:28 +0100)] 
Fix assert for relay/bridge state change

When we added support for separate client tls certs on bridges in
a2bb0bfdd5 we forgot to correctly initialize this when changing
from relay to bridge or vice versa while Tor is running. Fix that
by always initializing keys when the state changes.

Fixes bug 2433.

Conflicts:

src/or/config.c

14 years agoMerge remote-tracking branch 'public/cov_run224_022' into maint-0.2.2
Nick Mathewson [Wed, 26 Oct 2011 15:07:28 +0000 (11:07 -0400)] 
Merge remote-tracking branch 'public/cov_run224_022' into maint-0.2.2

14 years agoDon't crash when accountingmax is set in non-server Tors
Nick Mathewson [Fri, 3 Dec 2010 18:37:13 +0000 (13:37 -0500)] 
Don't crash when accountingmax is set in non-server Tors

We use a hash of the identity key to seed a prng to tell when an
accounting period should end.  But thanks to the bug998 changes,
clients no longer have server-identity keys to use as a long-term seed
in accounting calculations.  In any case, their identity keys (as used
in TLS) were never never fixed.  So we can just set the wakeup time
from a random seed instead there.  Still open is whether everybody
should be random.

This patch fixes bug 2235, which was introduced in 0.2.2.18-alpha.

Diagnosed with help from boboper on irc.

14 years agoProperly refcount client_identity_key
Sebastian Hahn [Tue, 26 Oct 2010 16:22:04 +0000 (18:22 +0200)] 
Properly refcount client_identity_key

In a2bb0bf we started using a separate client identity key. When we are
in "public server mode" (that means not a bridge) we will use the same
key. Reusing the key without doing the proper refcounting leads to a
segfault on cleanup during shutdown. Fix that.

Also introduce an assert that triggers if our refcount falls below 0.
That should never happen.

14 years agoAdd some asserts to get_{tlsclient|server}_identity_key
Nick Mathewson [Thu, 21 Oct 2010 17:54:12 +0000 (13:54 -0400)] 
Add some asserts to get_{tlsclient|server}_identity_key

We now require that:
  - Only actual servers should ever call get_server_identity_key
  - If you're being a client or bridge, the client and server keys should
    differ.
  - If you're being a public relay, the client and server keys
    should be the same.

14 years agoRename get_client_identity_key to get_tlsclient_identity_key
Nick Mathewson [Thu, 21 Oct 2010 17:53:31 +0000 (13:53 -0400)] 
Rename get_client_identity_key to get_tlsclient_identity_key

14 years agoMaintain separate server and client identity keys when appropriate.
Robert Ransom [Mon, 4 Oct 2010 05:38:53 +0000 (22:38 -0700)] 
Maintain separate server and client identity keys when appropriate.

Fixes a bug described in ticket #988.

Conflicts:

src/or/main.c
src/or/router.c

14 years agoMake crypto_free_pk_env tolerate NULL arg in 0.2.1. Error-proofing against bug 988...
Nick Mathewson [Sat, 13 Nov 2010 01:21:50 +0000 (20:21 -0500)] 
Make crypto_free_pk_env tolerate NULL arg in 0.2.1.  Error-proofing against bug 988 backport

14 years agoMaintain separate server and client TLS contexts.
Robert Ransom [Mon, 4 Oct 2010 01:14:08 +0000 (18:14 -0700)] 
Maintain separate server and client TLS contexts.

Fixes bug #988.

Conflicts:

src/or/main.c
src/or/router.c

14 years agoRefactor tor_tls_context_new:
Robert Ransom [Fri, 1 Oct 2010 21:06:57 +0000 (14:06 -0700)] 
Refactor tor_tls_context_new:

* Make tor_tls_context_new internal to tortls.c, and return the new
  tor_tls_context_t from it.

* Add a public tor_tls_context_init wrapper function to replace it.

Conflicts:

src/or/main.c
src/or/router.c

14 years agoAdd public_server_mode function.
Robert Ransom [Fri, 1 Oct 2010 07:07:10 +0000 (00:07 -0700)] 
Add public_server_mode function.

14 years agoMerge branch 'maint-0.2.1' into maint-0.2.2
Roger Dingledine [Wed, 26 Oct 2011 11:47:42 +0000 (07:47 -0400)] 
Merge branch 'maint-0.2.1' into maint-0.2.2

14 years agoFix zlib macro brokenness on osx with zlib 1.2.4 and higher.
Nick Mathewson [Tue, 8 Jun 2010 22:10:20 +0000 (18:10 -0400)] 
Fix zlib macro brokenness on osx with zlib 1.2.4 and higher.

From the code:
   zlib 1.2.4 and 1.2.5 do some "clever" things with macros.  Instead of
   saying "(defined(FOO) ? FOO : 0)" they like to say "FOO-0", on the theory
   that nobody will care if the compile outputs a no-such-identifier warning.

   Sorry, but we like -Werror over here, so I guess we need to define these.
   I hope that zlib 1.2.6 doesn't break these too.

Possible fix for bug 1526.

14 years agounmangle the fingerprint example in the man page
Roger Dingledine [Tue, 25 Oct 2011 22:24:37 +0000 (18:24 -0400)] 
unmangle the fingerprint example in the man page

Remove a confusing dollar sign from the example fingerprint in the
man page, and also make example fingerprint a valid one.

14 years agoMerge remote-tracking branch 'rransom-tor/bug4251-022' into maint-0.2.2
Nick Mathewson [Thu, 20 Oct 2011 04:01:58 +0000 (00:01 -0400)] 
Merge remote-tracking branch 'rransom-tor/bug4251-022' into maint-0.2.2

14 years agoFix crash when changing node restrictions with DNS lookup in progress
Nick Mathewson [Thu, 20 Oct 2011 03:14:05 +0000 (23:14 -0400)] 
Fix crash when changing node restrictions with DNS lookup in progress

Fixes bug 4259, bugfix on 0.2.2.25-alpha.  Bugfix by "Tey'".

Original message by submitter:

  Changing nodes restrictions using a controller while Tor is doing
  DNS resolution could makes Tor crashes (on WinXP at least). The
  problem can be repeated by trying to reach a non-existent domain
  using Tor:

    curl --socks4a 127.0.0.1:9050 inexistantdomain.ext

  .. and changing the ExitNodes parameter through the control port
  before Tor returns a DNS resolution error (of course, the following
  command won't work directly if the control port is password
  protected):

    echo SETCONF ExitNodes=TinyTurtle | nc -v 127.0.0.1 9051

  Using a non-existent domain is needed to repeat the issue so that
  Tor takes a few seconds for resolving the domain (which allows us to
  change the configuration). Tor will crash while processing the
  configuration change.

  The bug is located in the addressmap_clear_excluded_trackexithosts
  method which iterates over the entries of the addresses map in order
  to check whether the changes made to the configuration will impact
  those entries. When a DNS resolving is in progress, the new_adress
  field of the associated entry will be set to NULL. The method
  doesn't expect this field to be NULL, hence the crash.

14 years agoFree rend_data and intro_key when extra intro circs become general-purpose
Robert Ransom [Tue, 18 Oct 2011 14:08:02 +0000 (07:08 -0700)] 
Free rend_data and intro_key when extra intro circs become general-purpose