aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Expand)AuthorAge
...
| * Decide whether to use SSL flags based on runtime OpenSSL version.•••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] Nick Mathewson2010-01-29
* | Detect the correct versions of openssl for tls negotiation fix•••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.. Nick Mathewson2010-01-29
* | Decide whether to use SSL flags based on runtime OpenSSL version.•••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. Nick Mathewson2010-01-29
* | Don't unlock a new log until done logging the tor version.•••This might please coverity scan. Nick Mathewson2010-01-25
* | Merge remote branch 'origin/maint-0.2.1'Nick Mathewson2010-01-23
|\|
| * Avoid a possible crash in tls_log_errors.•••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. Nick Mathewson2010-01-22
* | Fix build on Solaris by disabling support for DisableAllSwap•••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. Sebastian Hahn2010-01-19
* | don't list windows capabilities in windows uname•••we never used them, and maybe it's a bad idea to publish them Roger Dingledine2010-01-15
* | Merge branch 'ewma'Nick Mathewson2009-12-18
|\ \
| * | Fix comment typos in container.cNick Mathewson2009-12-15
| * | Enhance pqueue so we can remove items from the middle.•••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. Nick Mathewson2009-12-12
* | | Remove duplicate words and a duplicate newline.Karsten Loesing2009-12-18
* | | Refactor out the 'find string at start of any line' logic.•••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. Nick Mathewson2009-12-17
* | | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-12-15
|\ \ \ | | |/ | |/|
| * | Fix bug 1173: remove an assert(unsigned >= 0).Nick Mathewson2009-12-15
* | | Refactor a bit so that it is safe to include math.h, and mostly not needed.Nick Mathewson2009-12-15
| |/ |/|
* | Merge commit 'sebastian/fixes'Nick Mathewson2009-12-12
|\ \
| * | Fix typo in a commentSebastian Hahn2009-12-12
* | | Merge commit 'sebastian/coverity'Nick Mathewson2009-12-12
|\ \ \
| * | | crypto_cipher_set_key cannot fail•••In 5e4d53d535a3cc9903250b3df0caa829f1c5e4bf we made it so that crypto_cipher_set_key cannot fail. The call will now always succeed, to returning a boolean for success/failure makes no sense. Sebastian Hahn2009-10-27
* | | | Now that FOO_free(NULL) always works, remove checks before calling it.Nick Mathewson2009-12-12
* | | | *_free functions now accept NULL•••Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary. Sebastian Hahn2009-12-12
| |/ / |/| |
* | | Merge commit 'origin/maint-0.2.1'Nick Mathewson2009-12-04
|\ \ \ | | |/ | |/|
| * | Improved workaround for disabled OpenSSL renegotiation.•••It turns out that OpenSSL 0.9.8m is likely to take a completely different approach for reenabling renegotiation than OpenSSL 0.9.8l did, so we need to work with both. :p Fixes bug 1158. (patch by coderman; commit message by nickm) Martin Peck2009-12-04
* | | add a minimum for CircuitStreamTimeout, plus a man page•••plus some other unrelated touchups that have been sitting in my sandbox Roger Dingledine2009-11-22
* | | Use the same mlockall checks with tor_set_max_memlockNick Mathewson2009-11-20
* | | Fix compilation on OSX 10.3.•••On this OSX version, there is a stub mlockall() function that doesn't work, *and* the declaration for it is hidden by an '#ifdef _P1003_1B_VISIBLE'. This would make autoconf successfully find the function, but our code fail to build when no declaration was found. This patch adds an additional test for the declaration. Nick Mathewson2009-11-20
* | | Fix compilation with with bionic libc.•••This fixes bug 1147: bionic doesn't have an actual implementation of mlockall(); mlockall() is merely in the headers but not actually in the library. This prevents Tor compilation with the bionic libc for Android handsets. Jacob Appelbaum2009-11-14
* | | Merge commit 'origin/maint-0.2.1'•••Conflicts: src/common/tortls.c Nick Mathewson2009-11-06
|\| |
| * | Make Tor work with OpenSSL 0.9.8l•••To fix a major security problem related to incorrect use of SSL/TLS renegotiation, OpenSSL has turned off renegotiation by default. We are not affected by this security problem, however, since we do renegotiation right. (Specifically, we never treat a renegotiated credential as authenticating previous communication.) Nevertheless, OpenSSL's new behavior requires us to explicitly turn renegotiation back on in order to get our protocol working again. Amusingly, this is not so simple as "set the flag when you create the SSL object" , since calling connect or accept seems to clear the flags. For belt-and-suspenders purposes, we clear the flag once the Tor handshake is done. There's no way to exploit a second handshake either, but we might as well not allow it. Nick Mathewson2009-11-05
| * | Code to parse and access network parameters.•••Partial backport of 381766ce4b1145460. Partial backport of 56c6d78520a98fb64. Nick Mathewson2009-10-14
* | | Implement DisableAllSwap to avoid putting secret info in page files.•••This commit implements a new config option: 'DisableAllSwap' This option probably only works properly when Tor is started as root. We added two new functions: tor_mlockall() and tor_set_max_memlock(). tor_mlockall() attempts to mlock() all current and all future memory pages. For tor_mlockall() to work properly we set the process rlimits for memory to RLIM_INFINITY (and beyond) inside of tor_set_max_memlock(). We behave differently from mlockall() by only allowing tor_mlockall() to be called one single time. All other calls will result in a return code of 1. It is not possible to change DisableAllSwap while running. A sample configuration item was added to the torrc.complete.in config file. A new item in the man page for DisableAllSwap was added. Thanks to Moxie Marlinspike and Chris Palmer for their feedback on this patch. Please note that we make no guarantees about the quality of your OS and its mlock/mlockall implementation. It is possible that this will do nothing at all. It is also possible that you can ulimit the mlock properties of a given user such that root is not required. This has not been extensively tested and is unsupported. I have included some comments for possible ways we can handle this on win32. Jacob Appelbaum2009-10-27
| |/ |/|
* | 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). Nick Mathewson2009-10-26
* | Reduce log level for someone else sending us weak DH keys.•••See task 1114. The most plausible explanation for someone sending us weak DH keys is that they experiment with their Tor code or implement a new Tor client. Usually, we don't care about such events, especially not on warn level. If we really care about someone not following the Tor protocol, we can set ProtocolWarnings to 1. Karsten Loesing2009-10-25
* | Fix two bugs found by Coverity scan.•••One was a simple buffer overrun; the other was a high-speed pointer collision. Both were introduced by my microdescs branch. Nick Mathewson2009-10-19
* | Merge branch 'microdesc'Nick Mathewson2009-10-19
|\ \
| * | Document the microdescriptor code better.Nick Mathewson2009-10-18
| * | Make start_writing_to_stdio_file() respect O_BINARY.Nick Mathewson2009-10-15
| * | Parse detached signature documents with multiple flavors and algorithms.Nick Mathewson2009-10-15
| * | Refactor consensus signature storage for multiple digests and flavors.•••This patch introduces a new type called document_signature_t to represent the signature of a consensus document. Now, each consensus document can have up to one document signature per voter per digest algorithm. Also, each detached-signatures document can have up to one signature per <voter, algorithm, flavor>. Nick Mathewson2009-10-15
| * | Code to generate, store, and parse microdescriptors and consensuses.•••The consensus documents are not signed properly, not served, and not exchanged yet. Nick Mathewson2009-10-15
| * | Add a function to get the most frequent member of a list.Nick Mathewson2009-10-15
| * | Support for encoding and decoding 256-bit digests in base64Nick Mathewson2009-10-15
* | | Document some formerly undocumented functions.Nick Mathewson2009-10-19
|/ /
* | Alter keygen function to generate keys of different lengths.Nick Mathewson2009-09-29
* | Disable OpenSSL engines when building for Android.•••Apparently the Android developers dumped OpenSSL's support for hardware acceleration in order to save some memory, so you can't build programs using engines on Android. [Patch revised by nickm] Nathan Freitas2009-09-29
* | Include util.h and log.h as relative paths.•••This shouldn't be necessary, but apparently the Android cross-compiler doesn't respect -I as well as it should. (-I is supposed to add to the *front* of the search path. Android's gcc wrapper apparently likes to add to the end. This is broken, but we need to work around it.) Nathan Freitas2009-09-29
* | Describe how to regenerate the TLS state name table.Nick Mathewson2009-09-25
* | Fix compilation on OpenSSLs with unusual state lists.•••"Unusual" in this context means "not the same as nickm's." We should grow a better list later. (Also, move TLS state table to a separate header.) Nick Mathewson2009-09-24
* | Debugging logs for TLS handshake•••The big change is to add a function to display the current SSL handshake state, and to log it everywhere reasonable. (A failure in SSL23_ST_CR_SRVR_HELLO_A is different from one in SSL3_ST_CR_SESSION_TICKET_A.) This patch also adds a new log domain for OR handshaking, so you can pull out all the handshake log messages without having to run at debug for everything. For example, you'd just say "log notice-err [handshake]debug-err file tor.log". Nick Mathewson2009-09-24