summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | | | | | | | | Check the result of SSL_set_ex_dataRobert Ransom2011-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by piebeer.
* | | | | | | | | Use SSL_*_ex_data instead of SSL_*_app_dataRobert Ransom2011-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL_*_app_data uses ex_data index 0, which will be the first one allocated by SSL_get_ex_new_index. Thus, if we ever started using the ex_data feature for some other purpose, or a library linked to Tor ever started using OpenSSL's ex_data feature, Tor would break in spectacular and mysterious ways. Using the SSL_*_ex_data functions directly now may save us from that particular form of breakage in the future. But I would not be surprised if using OpenSSL's ex_data functions at all (directly or not) comes back to bite us on our backends quite hard. The specified behaviour of dup_func in the man page is stupid, and crypto/ex_data.c is a horrific mess.
* | | | | | | | | Remove now-unused helper functionsRobert Ransom2011-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These functions were needed only by code removed in the preceding commit. Reported by mobmix.
* | | | | | | | | remove tls related hash table codeGladys Shufflebottom2011-03-01
| | | | | | | | |
* | | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-03-01
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | Avoid spurious bwhist parsing failuresNick Mathewson2011-03-01
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should fix a bug that special ran into, where if your state file didn't record period maxima, it would never decide that it had successfully parsed itself unless you got lucky with your uninitialized-variable values. This patch also tries to improve error messags in the case where a maximum value legitimately doesn't parse.
* | | | | | | | Revert bug1074_launch_authconn* branch: needs more design, less crashingNick Mathewson2011-02-28
| | | | | | | |
* | | | | | | | Add a missing constNick Mathewson2011-02-25
| | | | | | | |
* | | | | | | | Merge branch 'bug1074_launch_conn_on_skew'Nick Mathewson2011-02-25
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed conflict on rename of router_get_by_digest->router_get_by_id_digest Conflicts: src/or/command.c
| * | | | | | | | Changes file for altf4's bug1074 stuffNick Mathewson2011-02-25
| | | | | | | | |
| * | | | | | | | whitespace fixupNick Mathewson2011-02-25
| | | | | | | | |
| * | | | | | | | Fix for #1074 previous revAltF42011-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed tor_addr_from_ipv4n to tor_addr_from_ipv4h and changed descriptor_digest to identity_digest
| * | | | | | | | Fix for #1074 "Part 3"AltF42011-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changed received_netinfo_from_trusted_dir into a tristate in order to keep track of whether we have already tried contacting a trusted dir. So we don't send multiple requests if we get a bunch of skews.
| * | | | | | | | Sebastian's Changes to #1074AltF42011-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes some small mistakes with AltF4's #1074 fix
| * | | | | | | | Fix time skew values from untrusted sourcesAltF42011-02-25
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Now when we receive a large time skew from a source which isn't a trusted dir, we go contact a trusted dir to trigger a NETINFO cell.
* | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-25
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Merge branch 'bug1863_bwhist' into maint-0.2.2Nick Mathewson2011-02-25
| |\ \ \ \ \ \ \
| | * | | | | | | Fix two potential bugs in the bug1863 code.Karsten Loesing2011-02-24
| | | | | | | | |
| | * | | | | | | fix some spelling in rephist commentsNick Mathewson2011-01-10
| | | | | | | | |
| | * | | | | | | Add Maxima lists to bandwidth state.Nick Mathewson2011-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, Tor routers don't save the maxima values from the bw_history_t between sessions. That's no good, since we use those values to determine bandwidth. This code adds a new BWHist.*Maximum set of values to the state file. If they're not present, we estimate them by taking the observed total bandwidth and dividing it by the period length, which provides a lower bound. This should fix bug 1863. I'm calling it a feature.
| | * | | | | | | On bwhist state load failure, clear dir_read/write hist tooNick Mathewson2011-01-10
| | | | | | | | |
| | * | | | | | | Fix bug when parsing bwhist with unexpected IntervalNick Mathewson2011-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, our state parsing code would fail to parse a bwhist correctly if the Interval was anything other than the default hardcoded 15 minutes. This change makes the parsing less incorrect, though the resulting history array might get strange values in it if the intervals don't match the one we're using. (That is, if stuff was generated in 15 minute intervals, and we read it into an array that expects 30 minute intervals, we're fine, since values can be combined pairwise. But if we generate data at 30 minute intervals and read it into 15 minute intervals, alternating buckets will be empty.) Bugfix on 0.1.1.11-alpha.
| | * | | | | | | Turn the loop bodies of rep_hist_save/load_state into functionsNick Mathewson2011-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The trick of looping from i=0..4 , switching on i to set up some variables, then running some common code is much better expressed by just calling a function 4 times with 4 sets of arguments. This should make the code a little easier to follow and maintain here.
* | | | | | | | | Fix memory leak in md-download logicNick Mathewson2011-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also fix some microdesc comments Fix for bug 2623
* | | | | | | | | Merge remote branch 'sebastian/osx_compile'Nick Mathewson2011-02-24
|\ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / |/| | | | | | | |
| * | | | | | | | Fix a couple of compile warnings on OS X 10.6Sebastian Hahn2011-02-24
| | | | | | | | |
* | | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-22
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| / / / / / / / | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | There was a conflict from the node_t transition, but it was an easy fix. Conflicts: src/or/circuitbuild.c
| * | | | | | | Merge remote branch 'arma/bug2403' into maint-0.2.2Nick Mathewson2011-02-22
| |\ \ \ \ \ \ \
| | * | | | | | | prevent same entry and exit for insane edge caseRoger Dingledine2011-02-22
| | | | | | | | |
* | | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-22
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | Add some dollar signs in an attempt to appease older asciidocsNick Mathewson2011-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should really require a modern asiidoc: backporting stuff to 8.2 is a timesink.
* | | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-22
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.in
| * | | | | | | | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-02-22
| |\ \ \ \ \ \ \ \ | | | |_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.in
| | * | | | | | | Remove doc/spec/Makefile.in from list of generated filesNick Mathewson2011-02-22
| | | | | | | | |
* | | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-22
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / /
| * | | | | | | | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-02-22
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | (This is an "ours" merge of the code for bug1859 backported to 0.2.1.)
| | * | | | | | | Merge remote branch 'public/bug1859_021' into maint-0.2.1Nick Mathewson2011-02-22
| | |\ \ \ \ \ \ \
| | | * | | | | | | Fix a remaining bug in Robert's bug1859 fix.Nick Mathewson2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When intro->extend_info is created for an introduction point, it only starts out with a nickname, not necessarily an identity digest. Thus, doing router_get_by_digest isn't necessarily safe.
| | | * | | | | | | Issues with router_get_by_nickname() (3)Robert Hogan2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add changes file
| | | * | | | | | | Issues with router_get_by_nickname()Robert Hogan2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/1859 Use router_get_by_digest() instead of router_get_by_hexdigest() in circuit_discard_optional_exit_enclaves() and rend_client_get_random_intro(), per Nick's comments. Using router_get_by_digest() in rend_client_get_random_intro() will break hidden services published by Tor versions pre 0.1.2.18 and 0.2.07-alpha as they only publish by nickname. This is acceptable however as these versions only publish to authority tor26 and don't work for versions in the 0.2.2.x series anyway.
| | | * | | | | | | Issues with router_get_by_nickname()Robert Hogan2010-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://trac.torproject.org/projects/tor/ticket/1859 There are two problems in this bug: 1. When an OP makes a .exit request specifying itself as the exit, and the exit is not yet listed, Tor gets all the routerinfos needed for the circuit but discovers in circuit_is_acceptable() that its own routerinfo is not in the routerdigest list and cannot be used. Tor then gets locked in a cycle of repeating these two steps. When gathering the routerinfos for a circuit, specifically when the exit has been chosen by .exit notation, Tor needs to apply the same rules it uses later on when deciding if it can build a circuit with those routerinfos. 2. A different bug arises in the above situation when the Tor instance's routerinfo *is* listed in the routerlist, it shares its nickname with a number of other Tor nodes, and it does not have 'Named' rights to its nickname. So for example, if (i) there are five nodes named Bob in the network, (ii) I am running one of them but am flagged as 'Unnamed' because someone else claimed the 'Bob' nickname first, and (iii) I run my Tor as both client and exit the following can happen to me: - I go to www.evil.com - I click on a link www.evil.com.bob.exit - My request will exit through my own Tor node rather than the 'Named' node Bob or any of the others. - www.evil.com now knows I am actually browsing from the same computer that is running my 'Bob' node So to solve both issues we need to ensure: - When fulfilling a .exit request we only choose a routerinfo if it exists in the routerlist, even when that routerinfo is ours. - When getting a router by nickname we only return our own router information if it is not going to be used for building a circuit. We ensure this by removing the special treatment afforded our own router in router_get_by_nickname(). This means the function will only return the routerinfo of our own router if it is in the routerlist built from authority info and has a unique nickname or is bound to a non-unique nickname. There are some uses of router_get_by_nickname() where we are looking for the router by name because of a configuration directive, specifically local declaration of NodeFamilies and EntryNodes and other routers' declaration of MyFamily. In these cases it is not at first clear if we need to continue returning our own routerinfo even if our router is not listed and/or has a non-unique nickname with the Unnamed flag. The patch treats each of these cases as follows: Other Routers' Declaration of MyFamily This happens in routerlist_add_family(). If another router declares our router in its family and our router has the Unnamed flag or is not in the routerlist yet, should we take advantage of the fact that we know our own routerinfo to add us in anyway? This patch says 'no, treat our own router just like any other'. This is a safe choice because it ensures our client has the same view of the network as other clients. We also have no good way of knowing if our router is Named or not independently of the authorities, so we have to rely on them in this. Local declaration of NodeFamilies Again, we have no way of knowing if the declaration 'NodeFamilies Bob,Alice,Ringo' refers to our router Bob or the Named router Bob, so we have to defer to the authorities and treat our own router like any other. Local declaration of NodeFamilies Again, same as above. There's also no good reason we would want our client to choose it's own router as an entry guard if it does not meet the requirements expected of any other router on the network. In order to reduce the possibility of error, the patch also replaces two instances where we were using router_get_by_nickname() with calls to router_get_by_hexdigest() where the identity digest of the router is available.
* | | | | | | | | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-02-22
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / /
| * | | | | | | | | changes file for removing torspec from the tarballRoger Dingledine2011-02-22
| | | | | | | | | |
| * | | | | | | | | Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson2011-02-22
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | | | | / / / / / / | | |_|/ / / / / / | |/| | | | | | | Use "ours" strategy" to avoid taking bug2402 fix.
| | * | | | | | | Merge remote branch 'public/bug2402_nothing' into maint-0.2.1Nick Mathewson2011-02-22
| | |\ \ \ \ \ \ \
| | | * | | | | | | Simplest fix to bug2402: do not include SVN versionsNick Mathewson2011-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we stopped using svn, 0.2.1.x lost the ability to notice its svn revision and report it in the version number. However, it kept looking at the micro-revision.i file... so if you switched to master, built tor, then switched to 0.2.1.x, you'd get a micro-revision.i file from master reported as an SVN tag. This patch takes out the "include the svn tag" logic entirely. Bugfix on 0.2.1.15-rc; fixes bug 2402.
| | * | | | | | | | changes file for removing torspec from the tarballRoger Dingledine2011-02-22
| | | | | | | | | |
* | | | | | | | | | Merge branch 'maint-0.2.2'Roger Dingledine2011-02-22
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / /
| * | | | | | | | | Merge branch 'maint-0.2.1' into maint-0.2.2Roger Dingledine2011-02-22
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / /
| | * | | | | | | | prefer https urlsRoger Dingledine2011-02-22
| | | | | | | | | |