aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Collapse)AuthorAge
* Add fmt_addrport.David Fifield2012-10-10
| | | | | This function formats an addr:port pair, and always decorates IPv6 addresses.
* Merge remote-tracking branch 'public/openssl_1_is_best'Nick Mathewson2012-10-04
|\
| * Log a notice if we're running with OpenSSL before 1.0.0.Nick Mathewson2012-09-12
| | | | | | | | | | These versions have some dubious, slow crypto implementations; 1.0.0 is a great improvement, and at this point is pretty mature.
| * Drop support for openssl 0.9.7Nick Mathewson2012-09-12
| | | | | | | | | | | | | | 097 hasn't seen a new version since 2007; we can drop support too. This lets us remove our built-in sha256 implementation, and some checks for old bugs.
* | Fix comment in crypto.h; bug 6830Nick Mathewson2012-09-21
| |
* | Fix comment typo in tor_memeqRobert Ransom2012-09-17
| |
* | Fix documentation for crypto_pk_cmp_keysRobert Ransom2012-09-17
| | | | | | | | | | | | | | | | | | | | Now that crypto_pk_cmp_keys might return the result of tor_memcmp, there is no guarantee that it will only return -1, 0, or 1. (It currently does only return -1, 0, or 1, but that's a lucky accident due to details of the current implementation of tor_memcmp and the particular input given to it.) Fortunately, none of crypto_pk_cmp_keys's callers rely on this behaviour, so changing its documentation is sufficient.
* | Implement and use crypto_pk_eq_keysRobert Ransom2012-09-17
| |
* | Make crypto_pk_cmp_keys do something sane for NULL keysRobert Ransom2012-09-17
| | | | | | | | | | Fixes bug 4283; bugfix on r76 (Git commit 01aadefbfc7dbd99ddaff922b897996b768cf2f9).
* | Merge branch '6044_nm_squashed'Nick Mathewson2012-09-17
|\ \
| * | Handle FIFOs in read_file_to_strmeejah2012-09-17
| | | | | | | | | | | | | | | | | | | | | | | | add read_file_to_str_until_eof which is used by read_file_to_str if the file happens to be a FIFO. change file_status() to return FN_FILE if st_mode matches S_IFIFO (on not-windows) so that init_key_from_file() will read from a FIFO.
* | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-09-14
|\ \ \
| * | | 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.
* | | | Fix compilation with older gccsNick Mathewson2012-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They don't like to have #preprocessor directives inside macro arguments. Fixes #6842; fix on 0.2.4.2-alpha. Found by grarpamp.
* | | | Don't compute ((uint64_t)1)<<64 in round_to_power_of_2Nick Mathewson2012-09-14
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This would be undefined behavior if it happened. (It can't actually happen as we're using round_to_power_of_2, since we would have to be trying to allocate exabytes of data.) While we're at it, fix the behavior of round_to_power_of_2(0), and document the function better. Fix for bug 6831.
* | | hot: we fixed incancations to be intancations.Roger Dingledine2012-09-12
| | |
* | | Merge remote-tracking branch 'public/bug6538'Nick Mathewson2012-09-11
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: configure.ac
| * | | Spelling fix in util.c commentsNick Mathewson2012-08-27
| | | |
| * | | Change smartlist_choose_node_by_bandwidth to avoid doubleNick Mathewson2012-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make our preferred solution to #6538 easier to implement, avoid a bunch of potential nastiness with excessive int-vs-double math, and generally make the code there a little less scary. "But wait!" you say. "Is it really safe to do this? Won't the results come out differently?" Yes, but not much. We now round every weighted bandwidth to the nearest byte before computing on it. This will make every node that had a fractional part of its weighted bandwidth before either slighty more likely or slightly less likely. Further, the rand_bw value was only ever set with integer precision, so it can't accurately sample routers with tiny fractional bandwidth values anyway. Finally, doing repeated double-vs-uint64 comparisons is just plain sad; it will involve an implicit cast to double, which is never a fun thing.
* | | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-09-11
|\ \ \ \ | | |/ / | |/| / | |_|/ |/| |
| * | 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.
* | | | Downgrade "EVP ctr128 is ok" message to infoNick Mathewson2012-09-10
| | | | | | | | | | | | | | | | Part of 6736 effort to try to make startup quieter.
* | | | Merge branch 'quiet_lib_versions_squashed'Nick Mathewson2012-09-06
|\ \ \ \
| * | | | Detect openssl header version doesn't match runtime versionNick Mathewson2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already do this for libevent; let's do it for openssl too. For now, I'm making it always a warn, since this has caused some problems in the past. Later, we can see about making it less severe.
| * | | | Don't log about Libevent/OpenSSL initialization when all's wellNick Mathewson2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | OTOH, log the Libevent and OpenSSL versions on the first line when we're starting Tor.
* | | | | Merge branch 'bug6778'Nick Mathewson2012-09-06
|\ \ \ \ \
| * | | | | Fix a dependency: sha256.c influences crypto.o, not crypto.cNick Mathewson2012-09-06
| | | | | |
| * | | | | Fix a build-warning when building out-of-treeNick Mathewson2012-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were trying to incorporate all headers in common_sha1.i, not just the src/common ones. This is part of bug 6778; fix on 0.2.4.1-alpha
* | | | | | Merge remote-tracking branch 'asn/bug4567_rebased'Nick Mathewson2012-09-06
|\ \ \ \ \ \
| * | | | | | Fix some bugs that did not allow compilation on Windows.George Kadianakis2012-09-05
| | | | | | |
| * | | | | | General tweaks and fixes for Nick's comments.George Kadianakis2012-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add changes/ files. * Edit the tor-fw-helper manpage. * Fix check-spaces. * Add prototype for get_list_of_ports_to_forward(). * Fix tor_parse_long() TCP port range. * Improve doc. of tor_check_port_forwarding(). * Check for overflows in tor_check_port_forwarding(). * Demote successful port forwarding to LOG_INFO. Conflicts: src/common/address.c src/or/circuitbuild.c
| * | | | | | Refactor tor to support the new tor-fw-helper protocol.George Kadianakis2012-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add handle_fw_helper_output(), a function responsible for parsing the output of tor-fw-helper. Refactor tor_check_port_forwarding() and run_scheduled_events() accordingly too. We now issue warnings when we get control output from tor-fw-helper, and we log the verbose output of tor-fw-helper in LOG_INFO. Conflicts: src/common/util.c
| * | | | | | Introduce get_lines_from_handle().George Kadianakis2012-09-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_lines_from_handle() is a multiplatform function which drains lines from a stream and stuffs it into a smartlist. It's useful for line-based protocols, like the one managed proxy and the tor-fw-helper protocols.
* | | | | | | Merge remote-tracking branch 'asn/bug6779'Nick Mathewson2012-09-06
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | |
| * | | | | | Log more information when we fail to terminate a process.George Kadianakis2012-09-06
| |/ / / / /
* / / / / / Whitespace fixes.Linus Nordberg2012-09-05
|/ / / / /
* | | | | Merge remote-tracking branch 'linus/bug6363_only-ln'Nick Mathewson2012-09-04
|\ \ \ \ \
| * | | | | Add tor_addr_port_new().Linus Nordberg2012-09-04
| |/ / / /
* / / / / Remove trailing semicolon from #define TOR_ADDR_NULL.Linus Nordberg2012-09-04
|/ / / / | | | | | | | | | | | | Can it ever help? I can only see harm. What am I missing?
* | | | Rename configure.in to configure.acNick Mathewson2012-09-04
| | | | | | | | | | | | | | | | This is the preferred filename to use with Autoconf 2.50 and later.
* | | | Merge branch 'bug6524_nm'Nick Mathewson2012-08-27
|\ \ \ \
| * | | | build: minimal adjustments to make out-of-tree build workJim Meyering2012-08-27
| | | | |
| * | | | Make the _sha1.i file generation quieterNick Mathewson2012-08-23
| | | | |
| * | | | Fix up make distcheck and greatly simplify docs dependencies (although it's ↵Stewart Smith2012-08-09
| | | | | | | | | | | | | | | | | | | | still a bit odd)
| * | | | fix dependencies for some generated filesStewart Smith2012-08-09
| | | | |
| * | | | Move to non-recursive makeStewart Smith2012-08-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us a few benefits: 1) make -j clean all this will start working, as it should. It currently doesn't. 2) increased parallel build recursive make will max out at number of files in a directory, non-recursive make doesn't have such a limitation 3) Removal of duplicate information in make files, less error prone I've also slightly updated how we call AM_INIT_AUTOMAKE, as the way that was used was not only deprecated but will be *removed* in the next major automake release (1.13).... so probably best that we can continue to bulid tor without requiring old automake. (see http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html ) For more reasons why, see resources such as: http://miller.emu.id.au/pmiller/books/rmch/
* | | | | Merge remote-tracking branch 'origin/maint-0.2.3'Nick Mathewson2012-08-17
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | 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.