Age | Commit message (Collapse) | Author |
|
|
|
The tests previously assumed that the link handshake code would be
calling get_my_certs() -- when I changed it to call get_own_cert()
instead for the (case 2) 22460 fix, the tests failed, since the tls
connection wasn't really there.
This change makes us start mocking out the tor_tls_get_own_cert()
function too.
It also corrects the behavior of the mock_get_peer_cert() function
-- it should have been returning a newly allocated copy.
|
|
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related to 21278.
|
|
|
|
Determining if OpenSSL structures are opaque now uses an autoconf check
instead of comparing the version number. Some definitions have been
moved to their own check as assumptions which were true for OpenSSL
with opaque structures did not hold for LibreSSL. Closes ticket 21359.
|
|
This disregards anything smaller than an IPv6 /64, and rejects ports that
are rejected on an IPv6 /16 or larger.
Adjust existing unit tests, and add more to cover exceptional cases.
No IPv4 behaviour changes.
Fixes bug 21357
|
|
These tests currently fail due to bug 21357
|
|
Closes #20938
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Also combine all of the checks into one if-tree as only one of them
should actually succeed.
|
|
Attempted fix for 19960.
Also, fixes a typo.
|
|
This is an attempt to figure out what's up with #19960
|
|
This is an attempt to fix #19974.
|
|
|
|
|
|
We were freeing both dir{1,2} directly, and service_{1,2}->directory via
rend_service_free, even though they are the same pointer.
|
|
This pattern is much less error-prone when future changes are made.
|
|
Coverity doesn't like it when there are paths to the end of the
function where something doesn't get freed, even when those paths
are only reachable on unit test failure.
Fixes CID 1372899 and CID 1372900. Bug not in any released Tor.
|
|
|
|
Instead, refuse to start tor if any hidden service key has been used in
a different hidden service anonymity mode.
Fixes bug 20638; bugfix on 17178 in 0.2.9.3-alpha; reported by ahf.
The original single onion service poisoning code checked poisoning state
in options_validate, and poisoned in options_act. This was problematic,
because the global array of hidden services had not been populated in
options_validate (and there were ordrering issues with hidden service
directory creation).
This patch fixes this issue in rend_service_check_dir_and_add, which:
* creates the directory, or checks permissions on an existing directory, then
* checks the poisoning state of the directory, then
* poisons the directory.
When validating, only the permissions checks and the poisoning state checks
are perfomed (the directory is not modified).
|
|
Add extra logging and extra validity checks for hidden services.
|
|
|
|
no change in behavior except fewer log entries in the case where we use
a cached result.
|
|
expect_log_msg_containing_either4()
Fix typos:
* extra '('
* use assert_log_predicate (without 3 or 4 at the end)
Tidy whitespace.
Wrap long lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(We weren't actually using these ciphers; we were just requing that
ciphers of that name existed.)
Patch from rubiate. Fixes 20460
|
|
Runs a test for each combination of create/don't create directories.
Tests #20484.
|
|
passthrough_test_setup doesn't pass through arguments if the argument
is equal to 0 or TT_SKIP. Instead, it fails or skips the test.
Assert on this, so we don't accidentally fail or skip tests.
|
|
|
|
|
|
This avoids Win32 conditionals for mkdir.
|
|
|
|
ome policies are default-reject, some default-accept. But
policy_is_reject_star() assumed they were all default_reject. Fix
that!
Also, document that policy_is_reject_star() treats a NULL policy as
empty. This allows us to simplify the checks in
parse_reachable_addresses() by quite a bit.
Fxes bug 20306; bugfix on 0.2.8.2-alpha.
|
|
|
|
|
|
(This is safe, since only windows actually -uses- erstaz_socketpair.)
|
|
|
|
The test code, if it failed, or if it was run in verbose mode, would
use the wrong variable for its loop. Patch from rubiate uploaded to
19999.
|
|
(Specifically, carriage return after a quoted value in a config
line. Fixes bug 19167; bugfix on 0.2.0.16-alpha when we introduced
support for quoted values. Unit tests, changes file, and this
parenthetical by nickm.)
|
|
Feature 18753 -- all this to allow spaces.
|
|
|
|
|
|
|
|
|
|
Also, detect an additional failure type. Thanks, tests!
(How distinctly I recall thee)
|