summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2011-08-01Initial patch to build Tor with msvc and nmakeNick Mathewson
We'll still need to tweak it so that it looks for includes and libraries somewhere more sensible than "where we happened to find them on Erinn's system"; so that tests and tools get built too; so that it's a bit documented; and so that we actually try running the output. Work done with Erinn Clark.
2011-07-20Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-07-20Check return value in fmt_addrNick Mathewson
Previously, if tor_addr_to_str() returned NULL, we would reuse the last value returned by fmt_addr(). (This could happen if we were erroneously asked to format an AF_UNSPEC address.) Now instead we return "???".
2011-07-19Turn streq_opt into a generic strcmp_opt.Nick Mathewson
2011-07-19Implement stream isolationNick Mathewson
This is the meat of proposal 171: we change circuit_is_acceptable() to require that the connection is compatible with every connection that has been linked to the circuit; we update circuit_is_better to prefer attaching streams to circuits in the way that decreases the circuits' usefulness the least; and we update link_apconn_to_circ() to do the appropriate bookkeeping.
2011-07-15Make WIN32_WINNT defines conditionalNick Mathewson
Requested by Gisle Vanem on tor-dev. I'm not quite sure this is the right solution, but it's probably harmless.
2011-07-11Document feature3116 fns and improve outputNick Mathewson
- We were reporting the _bottom_ N failing states, not the top N. - With bufferevents enabled, we logged all TLS states as being "in bufferevent", which isn't actually informative. - When we had nothing to report, we reported nothing too loudly. - Also, we needed documentation.
2011-07-11Record the states of failing OR connectionsNick Mathewson
This code lets us record the state of any outgoing OR connection that fails before it becomes open, so we can notice if they're all dying in the same SSL state or the same OR handshake state. More work is still needed: - We need documentation - We need to actually call the code that reports the failure when we realize that we're having a hard time connecting out or making circuits. - We need to periodically clear out all this data -- perhaps, whenever we build a circuit successfully? - We'll eventually want to expose it to controllers, perhaps. Partial implementation of feature 3116.
2011-07-01Merge branch 'cov217_master'Nick Mathewson
2011-07-01Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-07-01Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
2011-07-01Fix insanely large stack_allocation in log_credential_statusNick Mathewson
I'm not one to insist on C's miserly stack limits, but allocating a 256K array on the stack is too much even for me. Bugfix on 0.2.1.7-alpha. Found by coverity. Fixes CID # 450.
2011-07-01Replace 4 more sscanf()s with tor_sscanf()Nick Mathewson
For some inexplicable reason, Coverity departs from its usual standards of avoiding false positives here, and warns about all sscanf usage, even when the formatting strings are totally safe. Addresses CID # 447, 446.
2011-06-22Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-06-22Improve documentation of smartlist_split_stringRobert Ransom
2011-06-22Fix minor comment issuesRobert Ransom
2011-06-20Log SSL state changes at LOG_DEBUG, LD_HANDSHAKE.Nick Mathewson
This can be slightly useful for debugging blocking events. Addresses ticket 3116; based on loud_ssl_states branch.
2011-06-20Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-06-20Fix overwide lines in util.cNick Mathewson
2011-06-14Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-06-14Make ControlSocketsGroupWritable work with User.Jérémy Bobbio
Original message from bug3393: check_private_dir() to ensure that ControlSocketsGroupWritable is safe to use. Unfortunately, check_private_dir() only checks against the currently running user… which can be root until privileges are dropped to the user and group configured by the User config option. The attached patch fixes the issue by adding a new effective_user argument to check_private_dir() and updating the callers. It might not be the best way to fix the issue, but it did in my tests. (Code by lunar; changelog by nickm)
2011-06-06Merge remote-tracking branch 'asn2/bug3336'Nick Mathewson
2011-06-06Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-06-06Check maximum properly in crypto_rand_int()Nick Mathewson
George Kadianakis notes that if you give crypto_rand_int() a value above INT_MAX, it can return a negative number, which is not what the documentation would imply. The simple solution is to assert that the input is in [1,INT_MAX+1]. If in the future we need a random-value function that can return values up to UINT_MAX, we can add one. Fixes bug 3306; bugfix on 0.2.2pre14.
2011-06-05Add the heartbeat domain in log.c:domain_list[]George Kadianakis
so that parse_log_domain() doesn't fail.
2011-06-03Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-06-03Reject 128-byte keys that are not 1024-bitNick Mathewson
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-01Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-06-01Fix compile error in procmon.cGisle
An elusive compile-error (MingW-gcc v4.50 on Win_XP); a missing comma (!) and a typo ('err_msg' at line 277 changed to 'errmsg'). Aso changed the format for 'err_code' at line 293 into a "%ld" to suppress a warning. How did this go unnoticed for ~1 month? Btw. This is my 1st ever 'git commit', so it better work.
2011-05-30Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
The conflicts were mainly caused by the routerinfo->node transition. Conflicts: src/or/circuitbuild.c src/or/command.c src/or/connection_edge.c src/or/directory.c src/or/dirserv.c src/or/relay.c src/or/rendservice.c src/or/routerlist.c
2011-05-30whitespace fixesNick Mathewson
2011-05-30Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/compat.c src/or/main.c
2011-05-30Merge remote-tracking branch 'public/bug3270' into maint-0.2.2Nick Mathewson
2011-05-28Fix a -Wunused-but-set-variable instance in masterNick Mathewson
2011-05-23Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-05-22Unbreak the build on libevent 1.x systemsRobert Ransom
2011-05-23Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
Conflicts: src/common/Makefile.am src/or/control.c
2011-05-23Merge branch 'feature3049-v2' into maint-0.2.2Nick Mathewson
Conflicts: src/common/Makefile.am
2011-05-23The first argument for a libevent callback should be evutil_socket_tNick Mathewson
2011-05-23Appease make check-spaces wrt procmon.hNick Mathewson
2011-05-23Use a 64-bit type to hold sockets on win64.Nick Mathewson
On win64, sockets are of type UINT_PTR; on win32 they're u_int; elsewhere they're int. The correct windows way to check a socket for being set is to compare it with INVALID_SOCKET; elsewhere you see if it is negative. On Libevent 2, all callbacks take sockets as evutil_socket_t; we've been passing them int. This patch should fix compilation and correctness when built for 64-bit windows. Fixes bug 3270.
2011-05-21Merge branch 'maint-0.2.2'Roger Dingledine
2011-05-20what's up with this trailing whitespaceRoger Dingledine
2011-05-20Fix some commentsRobert Ransom
2011-05-20Implement __OwningControllerProcess optionRobert Ransom
Implements part of feature 3049.
2011-05-16Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-05-16Merge remote-tracking branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Fixed trivial conflict due to headers moving into their own .h files from or.h. Conflicts: src/or/or.h
2011-05-16squash! Add crypto_pk_check_key_public_exponent functionNick Mathewson
Rename crypto_pk_check_key_public_exponent to crypto_pk_public_exponent_ok: it's nice to name predicates s.t. you can tell how to interpret true and false.
2011-05-16Add crypto_pk_check_key_public_exponent functionRobert Ransom
2011-05-15Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson