Age | Commit message (Collapse) | Author |
|
|
|
This adds test vectors for the overall client puzzle at the
hs_pow and hs_cell layers.
These are similar to the crypto/equix tests, but they also cover
particulars of our hs_pow format like the conversion to byte arrays,
the replay cache, the effort test, and the formatting of the equix
challenge string.
Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
|
|
This forgoes another external library dependency, and instead
introduces a compatibility header so that interested parties
(who already depend on equix, like hs_pow and unit tests) can
use the implementation of blake2b included in hashx.
Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Closes #40469
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
This code is based directly on the specification, without looking at
the reference implementation or the implementation in Arti.
Nonetheless, it is now passing with the test vectors generated by
the reference implementation.
|
|
Conflicts:
src/test/test.c
Minor comment issue.
|
|
|
|
Related to #40266
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
This is unfortunately massive but both functionalities were extremely
intertwined and it would have required us to actually change the HSv2 code in
order to be able to split this into multiple commits.
After this commit, there are still artefacts of v2 in the code but there is no
more support for service, intro point and HSDir.
The v2 support for rendezvous circuit is still available since that code is
the same for the v3 and we will leave it in so if a client is able to
rendezvous on v2 then it can still transfer traffic. Once the entire network
has moved away from v2, we can remove v2 rendezvous point support.
Related to #40266
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Related to #40063
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Tor has a feature to preserve unrecognized state file entries in
order to maintain forward compatibility. But this feature, along
with some unused code that we never actually removed, led to us
keeping items that were of no use to the user, other than at worst
to preserve ancient information about them.
This commit adds a feature to remove obsolete entries when we load
the file.
Closes ticket 40137.
|
|
[This is a squashed patch for ticket 7193, based on taking a "git
diff" for the original branch, then applying it with "git apply
-3". I earlier attempted to squash the branch with "git rebase",
but there were too many conflicts. --nickm]
|
|
This is experimental and probably will break some platforms
|
|
|
|
|
|
First, we introduce a flag to teach src/test/test to split its work
into chunks. Then we replace our invocation of src/test/test in our
"make check" target with a set of 8 scripts that invoke the first
8th of the tests, the second 8th, and so on.
This change makes our "make -kj4 check" target in our hardened
gitlab build more than twice as fast, since src/test/test was taking
the longest to finish.
Closes 40098.
|
|
Tests %include with files and folders, modifying and reloading
the config file with sandbox enabled and reponse of SAVECONF and
getinfo config-can-saveconf control commmands.
|
|
Also adds generic tor_glob function to expand globs.
|
|
No probes at this point. They are per subsystem and thus in later commits.
Part of #32910
|
|
|
|
|
|
In "make test-network", add tests for single onion services v2 and v3.
In "make test-network-all", test onion services v2 and v3 in the same
network.
Part of 33334.
|
|
This network is used in make test-network-all and test-network-ipv6.
Closes 33334.
|
|
This network is used in make test-network-all and test-network-ipv4.
Part of 33334.
|
|
Use bridges+hs-v23 for "make test-network",
rather than using chutney's old default.
This change requires a recent version of chutney,
because the old bridges+hs-v23 did not work.
(See chutney's 33302 for details.)
Closes 28208.
|
|
The IPv6 test only runs if IPv6 is available.
Also, explicitly use the bridges+hs-v2 network for the IPv4-only test.
This network was chutney's default as of January 2020.
Closes 33300.
|
|
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
|
|
|
|
Some of these helpers will be needed in multiple places in the unit
tests, so we should move them now.
|
|
|
|
|
|
|
|
Part of 32213.
|
|
At this commit, 93.9% of line coverage and 95.5% of function coverage.
Closes #32196
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
Fake circuits are created everywhere in the unit tests. This is an attempt at
centralizing a "fake circuit creation" API like fakechans.c does for channel.
This commit introduces fakecircs.c and changes test_relay.c and
test_circpadding.c which were using roughly the same code.
This will allow easier OR circuit creation for the future tests in
test_circuitmux.c
Signed-off-by: David Goulet <dgoulet@torproject.org>
|
|
|
|
Based on examination of our tests, this mock function accepts
"localhost" and "torproject.org", and rejects everything else.
|
|
|
|
|
|
This script takes a set of example torrcs and command-lines from
src/test/conf_examples. If a success is expected, it runs "tor
--dump-config" and compares the result with the one we expect. If a
failure is expected, it runs "tor --verify-config" and greps for the
error we expect.
|
|
|
|
(This option tests our existing behavior, not necessarily the most
sensible behavior.)
|