aboutsummaryrefslogtreecommitdiff
path: root/src/test/test.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'public/bug3940_redux'Nick Mathewson2012-06-13
|\
| * An attempt at bug3940 and making AllowDotExit 0 work with MapAddressNick Mathewson2012-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This time, I follow grarpamp's suggestion and move the check for .exit+AllowDotExit 0 to the top of connection_ap_rewrite_and_attach, before any rewriting occurs. This way, .exit addresses are forbidden as they arrive from a socks connection or a DNSPort request, and not otherwise. It _is_ a little more complicated than that, though. We need to treat any .exit addresses whose source is TrackHostExits as meaning that we can retry without that exit. We also need to treat any .exit address that comes from an AutomapHostsOnResolve operation as user-provided (and thus forbidden if AllowDotExits==0), so that transitioning from AllowDotExits==1 to AllowDotExits==0 will actually turn off automapped .exit addresses.
* | 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.
* | 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.
* | Update copyright dates to 2012; add a few missing copyright statementsNick Mathewson2012-06-04
| |
* | Fix some remaining nmake/msvc build issuesNick Mathewson2012-05-16
|/
* Count IPv6 connections in bridge and entry stats.Karsten Loesing2012-02-09
|
* Use the standard _WIN32, not the Torism MS_WINDOWS or deprecated WIN32Nick Mathewson2012-01-31
| | | | | | | | | | | 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; }
* Rename nonconformant identifiers.Nick Mathewson2012-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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;
* Merge branch 'bug933_nm_rebased_v2'Nick Mathewson2011-11-30
|\ | | | | | | | | Conflicts: src/test/test.c
| * bug933 - Match against super-domains in MapAddressRobert Hogan2011-11-30
| | | | | | | | | | | | | | | | | | Allow MapAddress to handle directives such as: MapAddress .torproject.org .torserver.exit MapAddress .org 1.1.1.1 Add tests for addressmap_rewrite.
* | Make unit tests run again. Fix bug 4606.Nick Mathewson2011-11-29
| |
* | New src/test/bench.c to allow us to actually _run_ benchmark codeNick Mathewson2011-11-11
| | | | | | | | Yes, the timing functions are suboptimal. Please improve!
* | Fix the bench_{aes,dmap} test functions to work with TTSebastian Hahn2011-11-11
| | | | | | | | | | TT expects them to be named test_bench_{aes,dmap}. Also change the DISABLED macro to reflect that.
* | Merge remote-tracking branch 'asn2/bug3656'Nick Mathewson2011-10-07
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/common/util.c src/common/util.h src/or/config.h src/or/main.c src/test/test_util.c
| * | Add some unit tests.George Kadianakis2011-07-13
| | |
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-09-09
|\ \ \ | |_|/ |/| | | | | | | | | | | Conflicts: configure.in src/or/circuitbuild.c
| * | Use %f with printf-style formatting, not %lfNick Mathewson2011-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For printf, %f and %lf are synonymous, since floats are promoted to doubles when passed as varargs. It's only for scanf that we need to say "%lf" for doubles and "%f" for floats. Apparenly, some older compilers think it's naughty to say %lf and like to spew warnings about it. Found by grarpamp.
* | | Clean up bridge-stats code.Karsten Loesing2011-08-04
| | | | | | | | | | | | | | | | | | | | | | | | Only write a bridge-stats string if bridge stats have been initialized. This behavior is similar to dirreq-stats, entry-stats, etc. Also add a few unit tests for the bridge-stats code.
* | | Separate generation of an entry-stats string from writing it to disk.Karsten Loesing2011-08-04
| | | | | | | | | | | | | | | This commit is similar to the previous two commits for dirreq-stats, but for entry-stats.
* | | Separate generation of a dirreq-stats string from writing it to disk.Karsten Loesing2011-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch separates the generation of a dirreq-stats string from actually writing it to disk. The new geoip_format_dirreq_stats() generates a dirreq-stats string that geoip_dirreq_stats_write() writes to disk. All the state changing (e.g., resetting the dirreq-stats history and initializing the next measurement interval) takes place in geoip_dirreq_stats_write(). That allows us to finally test the dirreq-stats code better.
* | | Add unit tests for buffer-stats.Karsten Loesing2011-08-04
| | | | | | | | | | | | | | | | | | Now that formatting the buffer-stats string is separate from writing it to disk, we can also decouple the logic to extract stats from circuits and finally write some unit tests for the history code.
* | | Unit test for generic_buffer_set_to_copyNick Mathewson2011-07-20
| | |
* | | Remove compare_addr_to_addr_policyNick Mathewson2011-07-15
| | | | | | | | | | | | | | | Nothing used it but the unit tests; everything else knows to use compare_tor_addr_to_addr_policy instead.
* | | Merge remote-tracking branch 'public/bug1666'Nick Mathewson2011-07-13
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/spec/socks-extensions.txt src/or/buffers.c src/or/config.c src/or/connection_edge.c
| * | | Refactor fetch_from_buf_socks() to be greedyNick Mathewson2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, fetch_from_buf_socks() might return 0 if there was still data on the buffer and a subsequent call to fetch_from_buf_socks() would return 1. This was making some of the socks5 unit tests harder to write, and could potentially have caused misbehavior with some overly verbose SOCKS implementations. Now, fetch_from_buf_socks() does as much processing as it can, and returns 0 only if it really needs more data. This brings it into line with the evbuffer socks implementation.
| * | | Refactor socks unit tests into a suite of their ownNick Mathewson2011-06-29
| | | |
| * | | Record username/password data in socks_request_tNick Mathewson2011-06-29
| | | | | | | | | | | | | | | | | | | | | | | | This change also requires us to add and use a pair of allocator/deallocator functions for socks_request_t, instead of using tor_malloc_zero/tor_free directly.
| * | | Fix 'make check-spaces'Nick Mathewson2011-06-29
| | | |
| * | | bug1666 - Pass-through support for SOCKS5 authentication(4)Robert Hogan2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | Implement nickm's suggestion that we tolerate SOCKS5 clients that send authentication credentials and SOCKS commands all in one go.
| * | | bug1666 - Pass-through support for SOCKS5 authentication (2)Robert Hogan2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Address Nick's comments: - Refactor against changes in buffers.c - Ensure we have negotiated a method before accepting authentication credentials
| * | | bug1666 - Pass-through support for SOCKS5 authenticationRobert Hogan2010-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a SOCKS5 client insists on authentication, allow it to negotiate a connection with Tor's SOCKS server successfully. Any credentials the client provides are ignored. This allows Tor to work with SOCKS5 clients that can only support 'authenticated' connections. Also add a bunch of basic unit tests for SOCKS4/4a/5 support in buffers.c.
* | | | Check return value of crypto_global_init in test.cNick Mathewson2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This will let the unit tests fail in a less mystifying way if the crypto subsystem is b0rken, and will also make Coverity happier. CID # 429.
* | | | Make the get_options() return constNick Mathewson2011-06-14
| |_|/ |/| | | | | | | | | | | | | | | | | | | | This lets us make a lot of other stuff const, allows the compiler to generate (slightly) better code, and will make me get slightly fewer patches from folks who stick mutable stuff into or_options_t. const: because not every input is an output!
* | | Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson2011-04-07
|\ \ \ | | |/ | |/|
| * | Use GetTempDir instead of hardcoded path to c:\windows\tmp for unittestsGisle Vanem2011-04-07
| | |
* | | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2011-01-03
|\| | | |/ |/|
| * Bump copyright statements to 2011 (0.2.2)Nick Mathewson2011-01-03
| |
* | Write bidirectional connection stats in single line.Karsten Loesing2010-12-03
| | | | | | | | | | There's no need to have a separate line conn-stats-end for the end date and interval length with only a single line conn-bi-direct following.
* | Refactor conn stats and add unit tests.Karsten Loesing2010-12-03
| |
* | Merge remote branch 'origin/maint-0.2.2'Nick Mathewson2010-11-29
|\|
| * Report only the top 10 ports in exit-port stats.Karsten Loesing2010-11-24
| |
* | Merge branch 'nodes'Nick Mathewson2010-10-13
|\ \
| * | Implement policies for nodes (and for microdescriptors too)Nick Mathewson2010-10-01
| |/
* / Unit tests for microdescriptor cacheNick Mathewson2010-10-07
|/ | | | May help with tracking down bug #2022
* Do away with the complexity of the network liveness detection.Mike Perry2010-09-29
| | | | | | We really should ignore any timeouts that have *no* network activity for their entire measured lifetime, now that we have the 95th percentile measurement changes. Usually this is up to a minute, even on fast connections.
* Add unit test for tor_listdir.Nick Mathewson2010-08-20
|
* Remove unused function declarationsSebastian Hahn2010-08-17
| | | | | | Also remove some #if 0'd code from the unit tests for buffers. The code was killed in e6794e58081af773073c266e23fe3ab2ebecdb7e (5 years ago), and is now broken anyways.
* Fix compilation with --with-dmallocKarsten Loesing2010-08-16
| | | | Fixes 1832; bugfix on 0.2.2.6-alpha
* Merge commit 'sebastian/bug1831'Nick Mathewson2010-08-15
|\