aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Collapse)AuthorAge
* Turn a memwipe in tor_process_handle_destroy() back to memsetNick Mathewson2012-11-08
| | | | | It broke linking on tor-resolve.c, and it's not actually sanitizing anything sensitive. Fix for bug 7420; bug not on ony released Tor.
* Add and use and unlikely-to-be-eliminated memwipe()Nick Mathewson2012-11-08
| | | | | | | | | | Apparently some compilers like to eliminate memset() operations on data that's about to go out-of-scope. I've gone with the safest possible replacement, which might be a bit slow. I don't think this is critical path in any way that will affect performance, but if it is, we can work on that in 0.2.4. Fixes bug 7352.
* Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson2012-10-23
|\
| * Fix binary search on lists of 0 or 1 element.Nick Mathewson2012-10-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation we added has a tendency to crash with lists of 0 or one element. That can happen if we get a consensus vote, v2 consensus, consensus, or geoip file with 0 or 1 element. There's a DOS opportunity there that authorities could exploit against one another, and which an evil v2 authority could exploit against anything downloading v2 directory information.. This fix is minimalistic: It just adds a special-case for 0- and 1-element lists. For 0.2.4 (the current alpha series) we'll want a better patch. This is bug 7191; it's a fix on 0.2.0.10-alpha.
* | Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson2012-10-19
|\|
| * Disable TLS Session Tickets, which we were apparently getting for freeNick Mathewson2012-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSSL 1.0.0 added an implementation of TLS session tickets, a "feature" that let session resumption occur without server-side state by giving clients an encrypted "ticket" that the client could present later to get the session going again with the same keys as before. OpenSSL was giving the keys to decrypt these tickets the lifetime of the SSL contexts, which would have been terrible for PFS if we had long-lived SSL contexts. Fortunately, we don't. Still, it's pretty bad. We should also drop these, since our use of the extension stands out with our non-use of session cacheing. Found by nextgens. Bugfix on all versions of Tor when built with openssl 1.0.0 or later. Fixes bug 7139.
* | Use file-size-fixup code on cygwin too.Nick Mathewson2012-09-14
| | | | | | | | | | | | | | | | | | We already had code on windows to fix our file sizes when we're reading a file in text mode and its size doesn't match the size from fstat. But that code was only enabled when _WIN32 was defined, and Cygwin defines __CYGWIN__ instead. Fixes bug 6844; bugfix on 0.1.2.7-alpha.
* | Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson2012-09-11
|\| | | | | | | | | Conflicts: src/test/test_util.c
| * Fix assertion failure in tor_timegm.Nick Mathewson2012-09-11
| | | | | | | | Fixes bug 6811.
* | Fix more warnings from openbsd_mallocNick Mathewson2012-08-17
| | | | | | | | | | | | | | Apparently, (void)writev is not enough to suppress the "you are ignoring the return value!" warnings on Linux. Instead, remove the whole warning/error logic when compiling openbsd_malloc for Tor: we can't use it.
* | Fix warnings and 64-bit problems in openbsd-malloc codeNick Mathewson2012-08-15
| | | | | | | | | | | | | | | | | | | | | | The warning fixes are: - Only define issetugid if it's missing. - Explicitly ignore the return value of writev. - Explicitly cast the retval of readlink() to int. The 64-bit problems are related to just storing a size_t in an int. Not cool! Use a size_t instead. Fix for bug 6379. Bugfix on 0.2.0.20-rc, which introduced openbsd-malloc.
* | Tweaks to 6400 changes file and docs as suggested by armaNick Mathewson2012-07-18
| |
* | Change all SMARTLIST_FOREACH loops of >=10 lines to use BEGIN/ENDNick Mathewson2012-07-17
| | | | | | | | | | | | | | | | | | | | | | The SMARTLIST_FOREACH macro is more convenient than BEGIN/END when you have a nice short loop body, but using it for long bodies makes your preprocessor tell the compiler that all the code is on the same line. That causes grief, since compiler warnings and debugger lines will all refer to that one line. So, here's a new style rule: SMARTLIST_FOREACH blocks need to be short.
* | Fix port range in parse_port_range().George Kadianakis2012-07-06
| |
* | On windows, ENOBUFS starts with WSA. #6296. Fix on 0.2.18-rcNick Mathewson2012-07-05
| |
* | add a blurb for 0.2.3.18-rc, other minor cleanupsRoger Dingledine2012-06-28
| |
* | Fix a warning when using glibc's strcspn with clang.Nick Mathewson2012-06-26
| | | | | | | | | | | | | | | | With glibc 2.15 and clang 3.0, I get warnings from where we use the strcpsn implementation in the header as strcspn(string, "="). This is apparently because clang sees that part of the strcspn macro expands to "="[2], and doesn't realize that that part of the macro is only evaluated when "="[1] != 0.
* | Fix a compilation warning with clang 3.0Nick Mathewson2012-06-26
| | | | | | | | | | | | | | In b1ad1a1d0266a20bb we introduced an implicit (but safe) long-to-int shortening that clang didn't like. Warning not in any released version of Tor.
* | Don't assert in get_string_from_pipe() on len==0Nick Mathewson2012-06-23
| | | | | | | | | | | | | | We can treat this case as an EAGAIN (probably because of an unexpected internal NUL) rather than a crash-worthy problem. Fixes bug 6225, again. Bug not in any released version of Tor.
* | Resolve crash caused by format_helper_exit_status changes in #5557Nick Mathewson2012-06-23
| | | | | | | | | | | | | | | | | | Because the string output was no longer equal in length to HEX_ERRNO_SIZE, the write() call would add some extra spaces and maybe a NUL, and the NUL would trigger an assert in get_string_from_pipe. Fixes bug 6225; bug not in any released version of Tor.
* | Style tweaks and add a warning about NUL-terminationNick Mathewson2012-06-22
| |
* | Refactor unsigned int hex formatting out of format_helper_exit_status() in ↵Andrea Shepard2012-06-22
| | | | | | | | util.c
* | Make format_helper_exit_status() avoid unnecessary spacesAndrea Shepard2012-06-22
| |
* | fix a compiler warning added in one of my XXX023 fixes.Nick Mathewson2012-06-15
| |
* | Whitespace fixNick Mathewson2012-06-15
| |
* | Move tor_gettimeofday_cached() into compat_libeventNick Mathewson2012-06-15
| |
* | Refactor GETINFO process/descriptor-limitNick Mathewson2012-06-15
| | | | | | | | | | Previously it duplicated some getrlimit code and content from compat.c; now it doesn't.
* | Triage the XXX023 and XXX022 comments: postpone many.Nick Mathewson2012-06-15
| |
* | Change smartlist_create->smartlist_new in bug4744 branch as merged to masterNick Mathewson2012-06-13
| |
* | Merge branch 'bug4744_squashed'Nick Mathewson2012-06-13
|\ \
| * | Implement the client side of proposal 198Nick Mathewson2012-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a feature removal: we no longer fake any ciphersuite other than the not-really-standard SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA (0xfeff). This change will let servers rely on our actually supporting what we claim to support, and thereby let Tor migrate to better TLS ciphersuites. As a drawback, Tor instances that use old openssl versions and openssl builds with ciphers disabled will no longer give the "firefox" cipher list.
| * | Change our ciphersuite list to match ff8Nick Mathewson2012-05-15
| | |
| * | get_mozilla_ciphers: look at ssl3con.c, not sslenum.cNick Mathewson2012-03-14
| | |
| * | get_mozilla_ciphers: output lowercase hex.Nick Mathewson2012-03-14
| | |
| * | Try to make get_mozilla_ciphers output the right macros in the right orderNick Mathewson2012-03-14
| | |
| * | Have get_mozilla_ciphers take sourcedirs as argumentsNick Mathewson2012-03-14
| | |
| * | Make get_mozilla_ciphers script a little more regexy and readableNick Mathewson2012-03-14
| | |
| * | Script to generate ciphers.inc by ArturoNick Mathewson2012-03-14
| | |
* | | Fix another clang compile warningSebastian Hahn2012-06-13
| | | | | | | | | | | | We forgot this when we fixed 5969.
* | | Merge remote-tracking branch 'public/bug4592'Nick Mathewson2012-06-11
|\ \ \
| * | | Treat SW_SERVER_HELLO_B as another sign of an SSL handshakeNick Mathewson2012-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We've been only treating SW_SERVER_HELLO_A as meaning that an SSL handshake was happening. But that's not right: if the initial attempt to write a ServerHello fails, we would get a callback in state SW_SERVER_HELLO_B instead. (That's "instead" and not "in addition": any failed attempt to write the hello will fail and cause the info callback not to get written.) Fix for bug 4592; bugfix on 0.2.0.13-alpha.
* | | | Merge branch 'bug6097'Nick Mathewson2012-06-11
|\ \ \ \
| * | | | Fix mingw build with -DUNICODE -D_UNICODENick Mathewson2012-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | This is a very blunt fix, and mostly just turns some func() calls into FuncA() to make things build again. Fixes bug 6097.
| * | | | Be more careful calling wcstombsNick Mathewson2012-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function is not guaranteed to NUL-terminate its output. It *is*, however, guaranteed not to generate more than two bytes per multibyte character (plus terminating nul), so the general approach I'm taking is to try to allocate enough space, AND to manually add a NUL at the end of each buffer just in case I screwed up the "enough space" thing. Fixes bug 5909.
* | | | | typo noticed by "_raptor"Roger Dingledine2012-06-07
|/ / / /
* | | | Merge remote-tracking branch 'public/getfilesize_64'Nick Mathewson2012-06-05
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/compat.c The getfilesize change conflicted with the removal of file_handle from the windows tor_mmap_t.
| * | | | Use GetFileSize correctly on win32Nick Mathewson2012-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | (Use its second parameter to find the high 32 bits of the file size; check its return value for error conditions.)
* | | | | Fix some mingw build warningsNick Mathewson2012-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These include: - Having a weird in_addr that can't be initialized with {0} - Needing INVALID_HANDLE_VALUE instead of -1 for file handles. - Having a weird dependent definition for struct stat. - pid is signed, not unsigned.
* | | | | Merge remote-tracking branch 'public/bug3894'Nick Mathewson2012-06-05
|\ \ \ \ \
| * | | | | Fix some more FreeBSD4 issues (based on a patch from grarpamp)Nick Mathewson2012-05-16
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, freebsd 4 doesn't like malloc.h, needs sys/param.h for MIN/MAX, and doesn't have a SIZE_MAX. For bug 3894.