summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)Author
2010-04-20Demote a warning about missing client ciphersSebastian Hahn
2010-04-20minor cleanupsRoger Dingledine
2010-04-19Fix a compilation warning on compat_libevent.c on some versions of windows ↵Nick Mathewson
libevent
2010-04-19Fix two compile-blockers in tor_vasprintf().Nick Mathewson
1) mingw doesn't have _vscprintf(); mingw instead has a working snprintf. 2) windows compilers that _do_ have a working _vscprintf spell it so; they do not spell it _vcsprintf().
2010-04-15Merge commit 'origin/maint-0.2.1'Nick Mathewson
2010-04-13Fix renegotiation on OpenSSL versions that backport RFC5746.Nick Mathewson
Our code assumed that any version of OpenSSL before 0.9.8l could not possibly require SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION. This is so... except that many vendors have backported the flag from later versions of openssl when they backported the RFC5476 renegotiation feature. The new behavior is particularly annoying to detect. Previously, leaving SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION unset meant that clients would fail to renegotiate. People noticed that one fast! Now, OpenSSL's RFC5476 support means that clients will happily talk to any servers there are, but servers won't accept renegotiation requests from unpatched clients unless SSL_OP_ALLOW_etc is set. More fun: servers send back a "no renegotiation for you!" error, which unpatched clients respond to by stalling, and generally producing no useful error message. This might not be _the_ cause of bug 1346, but it is quite likely _a_ cause for bug 1346.
2010-04-02Merge branch 'asprintf'Nick Mathewson
2010-03-05commit my annotations while i was hunting down the host order bugRoger Dingledine
2010-02-28better handle the case where *strp is in asprintf argsNick Mathewson
2010-02-27Update copyright dates for files not in maint-0.2.1Nick Mathewson
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-27Update Tor Project copyright yearsNick Mathewson
2010-02-26Zero a cipher completely before freeing itSebastian Hahn
We used to only zero the first ptrsize bytes of the cipher. Since cipher is large enough, we didn't zero too many bytes. Discovered and fixed by ekir. Fixes bug 1254.
2010-02-25Add the MIN and MAX macros for platforms that lack themNick Mathewson
2010-02-25Fix 64-bit printf issues in consensus-bw-weights5-merge.Nick Mathewson
For my 64-bit Linux system running with GCC 4.4.3-fc12-whatever, you can't do 'printf("%lld", (int64_t)x);' Instead you need to tell the compiler 'printf("%lld", (long long int)x);' or else it doesn't believe the types match. This is why we added U64_PRINTF_ARG; it looks like we needed an I64_PRINTF_ARG too.
2010-02-25Add a tor_asprintf() function, and use it in a couple of places.Nick Mathewson
asprintf() is a GNU extension that some BSDs have picked up: it does a printf into a newly allocated chunk of RAM. Our tor_asprintf() differs from standard asprintf() in that: - Like our other malloc functions, it asserts on OOM. - It works on windows. - It always sets its return-field.
2010-02-22Remove misc unnecessary newlines found by new check.Mike Perry
2010-02-22Add %lld compat defines.Mike Perry
2010-02-22Merge remote branch 'sebastian/bug1254'Nick Mathewson
2010-02-22Make expand_filename into a tor_strdup() alias on windows.Nick Mathewson
On Windows, we don't have a notion of ~ meaning "our homedir", so we were deliberately using an #ifdef to avoid calling expand_filename() in multiple places. This is silly: The right place to turn a function into a no-op on a single platform is in the function itself, not in every single call-site.
2010-02-22Zero a cipher completely before freeing itSebastian Hahn
We used to only zero the first ptrsize bytes of the cipher. Since cipher is large enough, we didn't zero too many bytes. Discovered and fixed by ekir. Fixes bug 1254.
2010-02-21fix typo and garbage grammarRoger Dingledine
2010-02-19Merge remote branch 'sebastian/bug1143'Nick Mathewson
2010-02-19Make the DNSPort option work with libevent 2.xSebastian Hahn
We need to use evdns_add_server_port_with_base() when configuring our DNS listener, because libevent segfaults otherwise. Add a macro in compat_libevent.h to pick the correct implementation depending on the libevent version. Fixes bug 1143, found by SwissTorExit
2010-02-18Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: ChangeLog configure.in contrib/tor-mingw.nsi.in src/win32/orconfig.h
2010-02-18Fix compileSebastian Hahn
2010-02-17Even more conservative option-setting for SSL renegotiation.Nick Mathewson
This time, set the SSL3_FLAGS_ALLOW_UNSAFE_RENEGOTIATION flag on every version before OpenSSL 0.9.8l. I can confirm that the option value (0x0010) wasn't reused until OpenSSL 1.0.0beta3.
2010-02-12Remove the --enable-iphone option as needless.Nick Mathewson
On or-talk, Marco Bonetti reports that recent iPhone SDKs build Tor fine without it.
2010-02-10Add Windows version detection for Vista and 7Sebastian Hahn
Vista is Windows 6.0, and 7 is Windows 6.1. Fixes bug 1097. Also fix a coding style violation.
2010-02-09Make tor_addr_copy() conform to memcpy requirementsNick Mathewson
The src and dest of a memcpy() call aren't supposed to overlap, but we were sometimes calling tor_addr_copy() as a no-op. Also, tor_addr_assign was a redundant copy of tor_addr_copy(); this patch removes it.
2010-01-31Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-01-31Revise OpenSSL fix to work with OpenSSL 1.0.0beta*Nick Mathewson
In brief: you mustn't use the SSL3_FLAG solution with anything but 0.9.8l, and you mustn't use the SSL_OP solution with anything before 0.9.8m, and you get in _real_ trouble if you try to set the flag in 1.0.0beta, since they use it for something different. For the ugly version, see my long comment in tortls.c
2010-01-29Decide whether to use SSL flags based on runtime OpenSSL version.Nick Mathewson
We need to do this because Apple doesn't update its dev-tools headers when it updates its libraries in a security patch. On the bright side, this might get us out of shipping a statically linked OpenSSL on OSX. May fix bug 1225. [backported]
2010-01-29Detect the correct versions of openssl for tls negotiation fixNick Mathewson
Since it doesn't seem to hurt, we should use _both_ fixes whenever we see OpenSSL 0.9.7L .. 0.9.8, or OpenSSL 0.9.8L..
2010-01-29Decide whether to use SSL flags based on runtime OpenSSL version.Nick Mathewson
We need to do this because Apple doesn't update its dev-tools headers when it updates its libraries in a security patch. On the bright side, this might get us out of shipping a statically linked OpenSSL on OSX. May fix bug 1225.
2010-01-25Don't unlock a new log until done logging the tor version.Nick Mathewson
This might please coverity scan.
2010-01-23Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
2010-01-22Avoid a possible crash in tls_log_errors.Nick Mathewson
We were checking for msg==NULL, but not lib or proc. This case can only occur if we have an error whose string we somehow haven't loaded, but it's worth coding defensively here. Spotted by rieo on IRC.
2010-01-19Fix build on Solaris by disabling support for DisableAllSwapSebastian Hahn
Fixes bug 1198. Solaris doesn't have RLIMIT_MEMLOCK for get/setrlimit, so disable support because we don't know if all memory can be locked.
2010-01-15don't list windows capabilities in windows unameRoger Dingledine
we never used them, and maybe it's a bad idea to publish them
2009-12-18Merge branch 'ewma'Nick Mathewson
2009-12-18Remove duplicate words and a duplicate newline.Karsten Loesing
2009-12-17Refactor out the 'find string at start of any line' logic.Nick Mathewson
We do this in too many places throughout the code; it's time to start clamping down. Also, refactor Karsten's patch to use strchr-then-strndup, rather than malloc-then-strlcpy-then-strchr-then-clear.
2009-12-15Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-12-15Fix bug 1173: remove an assert(unsigned >= 0).Nick Mathewson
2009-12-15Refactor a bit so that it is safe to include math.h, and mostly not needed.Nick Mathewson
2009-12-15Fix comment typos in container.cNick Mathewson
2009-12-12Enhance pqueue so we can remove items from the middle.Nick Mathewson
This changes the pqueue API by requiring an additional int in every structure that we store in a pqueue to hold the index of that structure within the heap.
2009-12-12Merge commit 'sebastian/fixes'Nick Mathewson
2009-12-12Merge commit 'sebastian/coverity'Nick Mathewson