aboutsummaryrefslogtreecommitdiff
path: root/src/tools
AgeCommit message (Collapse)Author
2012-11-08Add and use and unlikely-to-be-eliminated memwipe()Nick Mathewson
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.
2012-07-16Coverity 709056: Check return value on fputs in tor-gencertNick Mathewson
2012-06-04Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson
2012-05-16Fix some remaining nmake/msvc build issuesNick Mathewson
2012-05-07Apply a patch from Gisle Vanem to make tor-gencert build under MSVCNick Mathewson
(Note: It makes sense to use tor-gencert on Windows for testing purposes only. If you are a directory authority operator, and you are contemplating running tor-gencert on a Windows box in an actual production environment, you are probably making a mistake.)
2012-04-24Fix compile error against miniupnpc-1.6 when --enable-upnpAnthony G. Basile
The bump from miniupnpc-1.5 to 1.6 changes the definition of two functions used by tor-fw-helper-upnp.c, upnpDiscover() and UPNP_AddPortMapping(). This patch addresses this and adds a check in configure.in for backwards compatibility. Thanks to Nickolay Kolchin-Semyonov for some hints. X-Tor-Bug-URL: https://trac.torproject.org/projects/tor/ticket/5434 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=376621 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-02-14Include compat.h from natpmp-helper to fix buildSebastian Hahn
This means tor_socket_t is declared.
2012-01-31Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson
This commit is completely mechanical; I used this perl script to make it: #!/usr/bin/perl -w -i.bak -p if (/^\s*\#/) { s/MS_WINDOWS/_WIN32/g; s/\bWIN32\b/_WIN32/g; }
2012-01-18Rename nonconformant identifiers.Nick Mathewson
Fixes bug 4893. These changes are pure mechanical, and were generated with this perl script: /usr/bin/perl -w -i.bak -p s/crypto_pk_env_t/crypto_pk_t/g; s/crypto_dh_env_t/crypto_dh_t/g; s/crypto_cipher_env_t/crypto_cipher_t/g; s/crypto_digest_env_t/crypto_digest_t/g; s/aes_free_cipher/aes_cipher_free/g; s/crypto_free_cipher_env/crypto_cipher_free/g; s/crypto_free_digest_env/crypto_digest_free/g; s/crypto_free_pk_env/crypto_pk_free/g; s/_crypto_dh_env_get_dh/_crypto_dh_get_dh/g; s/_crypto_new_pk_env_rsa/_crypto_new_pk_from_rsa/g; s/_crypto_pk_env_get_evp_pkey/_crypto_pk_get_evp_pkey/g; s/_crypto_pk_env_get_rsa/_crypto_pk_get_rsa/g; s/crypto_new_cipher_env/crypto_cipher_new/g; s/crypto_new_digest_env/crypto_digest_new/g; s/crypto_new_digest256_env/crypto_digest256_new/g; s/crypto_new_pk_env/crypto_pk_new/g; s/crypto_create_crypto_env/crypto_cipher_new/g; s/connection_create_listener/connection_listener_new/g; s/smartlist_create/smartlist_new/g; s/transport_create/transport_new/g;
2012-01-18Use tor_socket_t, not unsigned, in tor-fw-helper-natmp.cNick Mathewson
2011-12-19-lm should not be hardcoded.Martin Hebnes Pedersen
On some platforms (Haiku/BeOS) libm lives in libcore. Also added 'network' to the list of libraries to search for connect().
2011-12-10Fix compilation of natpmp-helper on non-windowsSebastian Hahn
Fixes a small oversight in 5dbfb1b3e0efc95be34ba7d69852511c9bac1f4b.
2011-11-30Make file descriptor type an unsigned integerSteven Murdoch
This avoids a warning from gcc (comparison between signed and unsigned integer expressions [-Werror=sign-compare]), under Windows
2011-11-30Support NAT-PMP on WindowsSteven Murdoch
- Link in libws32 and libiphlpapi, needed for libnatpmp (both in ./configure and when compiling tor-fw-helper-natpmp.c) - Define STATICLIB under Windows, to allow tor-fw-helper-natpmp.c to link - Don't include arpa/inet.h which isn't present in Mingw32 and doesn't appear to be needed on either Windows or MacOS X
2011-11-25tor-gencert: Fix a minor formatting issue in an error message (re: #4574)Peter Palfrader
2011-10-11Fix names of functions that convert strings to addrsNick Mathewson
Now let's have "lookup" indicate that there can be a hostname resolution, and "parse" indicate that there wasn't. Previously, we had one "lookup" function that did resolution; four "parse" functions, half of which did resolution; and a "from_str()" function that didn't do resolution. That's confusing and error-prone! The code changes in this commit are exactly the result of this perl script, run under "perl -p -i.bak" : s/tor_addr_port_parse/tor_addr_port_lookup/g; s/parse_addr_port(?=[^_])/addr_port_lookup/g; s/tor_addr_from_str/tor_addr_parse/g; This patch leaves aton and pton alone: their naming convention and behavior is is determined by the sockets API. More renaming may be needed.
2011-08-22Correct reference to libiphlpapi from libiphlapiSteven Murdoch
2011-08-22Appease "make check spaces"Steven Murdoch
2011-08-19Only link ws2_32 and iphlapi on windows.Nick Mathewson
This is a tweak for the tor-fw-helper port to windows.
2011-08-19Link and build tor-fw-helper on WindowsSteven Murdoch
- Update configure script to test for libminiupnpc along with the libws2_32 and libiphlpapi libraries required by libminiupnpc - When building tor-fw-helper, link in libiphlpapi - Link in libminiupnpc statically becasue I could not get the DLL to link properly - Call WSAStartup before doing network operations - Fix up a compiler warning about uninitialized backend_state N.B. The changes to configure.in and Makefile.am will break on non- Windows platforms.
2011-08-01Re-order tor_fw_helper_LDADD flags so that they workNick Mathewson
Patch from "blueness".
2011-07-19Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-07-19Specify text or binary mode in every start_writing_to_stdio_file callRobert Ransom
2011-06-20Fix tor-fw-helper-natpmp.c API usageJacob Appelbaum
libnatpmp-20110618 changed the API that tor-fw-helper used and for a time tor-fw-helper could not build against the newest libnatpmp. This patch brings support for libnatpmp to tor-fw-helper.
2011-05-28Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson
2011-05-23Remove the -F option from tor-resolve.Nick Mathewson
It used to mean "Force": it would tell tor-resolve to ask tor to resolve an address even if it ended with .onion. But when AutomapHostsOnResolve was added, automatically refusing to resolve .onion hosts stopped making sense. So in 0.2.1.16-rc (commit 298dc95dfd8), we made tor-resolve happy to resolve anything. The -F option stayed in, though, even though it didn't do anything. Oddly, it never got documented. Found while fixing GCC 4.6 "set, unused variable" warnings.
2011-01-03Bump copyright statements to 2011 (master)Nick Mathewson
2011-01-03Merge remote branch 'origin/maint-0.2.2'Nick Mathewson
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-11-11Stop linking src/tools/* against libeventNick Mathewson
2010-11-11Fix up tor-fw-helper "INCLUDES" directiveNick Mathewson
2010-11-11Split long lines in configure.in and Makefile.am filesNick Mathewson
Having very long single lines with lots and lots of things in them tends to make files hard to diff and hard to merge. Since our tools are one-line-at-a-time, we should try to construct lists that way too, within reason. This incidentally turned up a few headers in configure.in that we were for some reason searching for twice.
2010-09-30Fix space and formatting issuesNick Mathewson
2010-09-30Turn select() usage in tor-fw-helper into a function.Nick Mathewson
2010-09-30Start tor-fw-helper in the background, and log whatever it outputsSteven Murdoch
2010-09-30Changes to tor-fw-helper, some based on Nick's reviewJacob Appelbaum
* MINIUPNPC rather than the generic UPNP * Nick suggested a better abstraction model for tor-fw-helper * Fix autoconf to build with either natpmp or miniupnpc * Add AM_PROG_CC_C_O to fix automake complaint * update spec to address nickm's concern * refactor nat-pmp to match upnp state * we prefer tor_snprintf to snprintf * link properlty for tor_snprintf * rename test_commandline_options to log_commandline_options * cast this uint as an int * detect possible FD_SETSIZE errors * make note about future enhancements for natpmp * add upnp enhancement note * ChangeLog entry * doxygen and check-spaces cleanup * create tor-fw-helper.1.txt
2010-09-30First implementation of tor-fw-helper.Jacob Appelbaum
tor-fw-helper is a command-line tool to wrap and abstract various firewall port-forwarding tools. This commit matches the state of Jacob's tor-fw-helper branch as of 23 September 2010. (commit msg by Nick)
2010-07-09Rename log.h to torlog.hNick Mathewson
This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
2010-05-20clean up whitespace in src/toolsNick Mathewson
2010-04-14Add --enable-static-zlib optionSebastian Hahn
Works like the --enable-static-openssl/libevent options. Requires --with-zlib-dir to be set. Note that other dependencies might still pull in a dynamicly linked zlib, if you don't link them in statically too.
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-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-22Expand homedirs in paths passed to tor-checkkeySebastian Hahn
This is so that coverity stops complaining about using a user-supplied string with the open() syscall. Let's see if it works.
2010-01-24Merge commit 'origin/maint-0.2.1'Nick Mathewson
Resolved conflicts in: configure.in src/or/Makefile.am src/tools/Makefile.am
2010-01-24Add --enable-static-(openssl|libevent) optionsNick Mathewson
These options only work when using --with-(openssl|libevent)-dir to explicitly pick a libevent or openssl location.
2010-01-18Build Bug: -lm should come after passing ../common/libor.a to linkerMichael Witten
The following commit: commit e56747f9cf29ed788baf8805bfe391925d8a19da Author: Nick Mathewson <nickm@torproject.org> Date: Tue Dec 15 14:32:55 2009 -0500 Refactor a bit so that it is safe to include math.h, and mostly not needed. introduced this line: tor_resolve_LDADD = -lm ../common/libor.a @TOR_LIB_WS32@ which caused the build to fail, because only ../common/libor.a (via the embedded ../common/util.o via ../common/util.c) referenced libm's `lround' and `log' symbols, so that the linker (GNU ld) didn't bother to import those symbols before reading ../common/libor.a, thus leaving those symbols undefined. The solution was to swap the order, producing the line: tor_resolve_LDADD = ../common/libor.a -lm @TOR_LIB_WS32@ Signed-off-by: Michael Witten <mfwitten@gmail.com>
2009-12-15Refactor a bit so that it is safe to include math.h, and mostly not needed.Nick Mathewson
2009-09-29Make tor-gencert build on AndroidNick Mathewson
Previously, tor-gencert would call RSA_generate_key() directly. This won't work on Android, which removes the (deprecated since OpenSSL 0.9.8) function. We can't call RSA_generate_key_ex() unconditionally either, since that didn't exist before 0.9.8. Instead, we must call our own crypto_pk_generate_key_with_bits, which knows how to call RSA_generate_key or RSA_generate_key_ex as appropriate. [Based on patch by Nathan Freitas]