summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-13Fix a memory leak in options/validate__single_onionNick Mathewson
2016-09-13Fix a check-spaces warning.Nick Mathewson
2016-09-13options/validate__single_onion test: use new log capture apiNick Mathewson
I changed the API here in deb294ff532d074a7d4, to be less annoying to use.
2016-09-13Merge branch 'feature-17178-v7-squashed-v2'Nick Mathewson
2016-09-13Replace OnionService* with HiddenService* in option namesteor
And make consequential line-length adjustments.
2016-09-13Refactor Single Onion code to improve consistencyteor
* Check consistency between the two single onion torrc options * Use the more relevant option each time we check for single onion mode * Clarify log messages * Clarify comments * Otherwise, no behaviour change
2016-09-13Comments: prefer circuit_build_times_disabled() to LearnCircuitBuildTimeoutteor
2016-09-13Ephemeral Single Onion Services must have the NonAnonymous ADD_ONION flagteor
Tor checks that the flag matches the configured onion service anonymity. Tor refuses to create unflagged onion service using ADD_ONION, if they would be non-anonymous. The error is: 512 Tor is in non-anonymous onion mode Similarly, if the NonAnonymous flag is present, and Tor has the default anonymous onion config: 512 Tor is in anonymous onion mode
2016-09-13Refactor the hidden service code to use rend_service_pathteor
And make consequential changes to make it less error-prone. No behaviour change.
2016-09-13Allow the unit tests to pass a service list to rend_service_load_all_keysteor
2016-09-13Refactor UseEntryNodes so the original configured value is preservedteor
Parse the value to UseEntryNodes_option, then set UseEntryNodes before validating options. This way, Authorities, Tor2web, and Single Onion Services don't write spurious "UseEntryNodes 0" lines to their configs. Document the fact that these tor configurations ignore UseEntryNodes in the manual page. Also reorder options validation so we modify UseEntryNodes first, then check its value against EntryNodes. And silence a warning about disabled UseEntryNodes for hidden services when we're actually in non-anonymous single onion service mode.
2016-09-13Use CircuitBuildTimeout whenever circuit_build_times_disabled is trueteor
Previously, we checked LearnCircuitBuildTimeout directly. Fixes bug #20073 in commit 5b0b51ca3 on tor 0.2.4.12-alpha.
2016-09-13Fix a typo in a comment in rend_consider_services_intro_pointsteor
2016-09-13Fix a typo in the LearnCircuitBuildTimeout disabled log messageteor
2016-09-13When LearnCircuitBuildTimeout is disabled by other options, be quieterteor
2016-09-13Remove a duplicate non-anonymous warning log messageteor
We log this message every time we validate tor's options. There's no need to log a duplicate in main() as well. (It is impossible to run main() without validating our options.)
2016-09-13Refactor crypto init to use existing options variableteor (Tim Wilson-Brown)
2016-09-13Make Tor2web work with ReachableAddresses and CRN_DIRECT_CONNteor
The changes in #19973 fixed ReachableAddresses being applied too broadly, but they also broke Tor2web (somewhat unintentional) compatibility with ReachableAddresses. This patch restores that functionality, which makes intro and rend point selection is consistent between Tor2web and Single Onion Services.
2016-09-13Make Single Onion Service intro points respect ReachableAddressesteor
2016-09-13Implement Prop #260: Single Onion Servicesteor (Tim Wilson-Brown)
Add experimental OnionServiceSingleHopMode and OnionServiceNonAnonymousMode options. When both are set to 1, every hidden service on a tor instance becomes a non-anonymous Single Onion Service. Single Onions make one-hop (direct) connections to their introduction and renzedvous points. One-hop circuits make Single Onion servers easily locatable, but clients remain location-anonymous. This is compatible with the existing hidden service implementation, and works on the current tor network without any changes to older relays or clients. Implements proposal #260, completes ticket #17178. Patch by teor & asn. squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260: Single Onion Services Redesign single onion service poisoning. When in OnionServiceSingleHopMode, each hidden service key is poisoned (marked as non-anonymous) on creation by creating a poison file in the hidden service directory. Existing keys are considered non-anonymous if this file exists, and anonymous if it does not. Tor refuses to launch in OnionServiceSingleHopMode if any existing keys are anonymous. Similarly, it refuses to launch in anonymous client mode if any existing keys are non-anonymous. Rewrite the unit tests to match and be more comprehensive. Adds a bonus unit test for rend_service_load_all_keys().
2016-09-13Make rend_service_free available to the unit teststeor (Tim Wilson-Brown)
Also check that the port list exists before freeing it. Patch by asn.
2016-09-13Make preferred_chunk_size avoid overflow, handle big inputs betterNick Mathewson
Also, add tests for the function. Closes 20081; bugfix on 0.2.0.16-alpha. This is a Guido Vranken issue. Thanks, Guido!
2016-09-13Merge remote-tracking branch 'public/ticket19998'Nick Mathewson
2016-09-12Merge remote-tracking branch 'samdney/ticket19209'Nick Mathewson
2016-09-11Whoops. Cant call sockaddr_in a "sin", since sin() is a thing.Nick Mathewson
2016-09-11Fix gmtime unit test on openbsdNick Mathewson
openbsd helpfully handles gmtime() of INT64_MIN. Good job! Our tests didn't handle that so well.
2016-09-11Try to make our ersatz-socketpair test work better on FreeBSD jailsNick Mathewson
2016-09-11Tweak tor_gmtime_r test.Nick Mathewson
On openbsd64, I'm seeing a warning that the log isn't saying what I'd expect, but I'm not seeing what the answer actually _is_ here.
2016-09-11changes file for 19767Nick Mathewson
2016-09-11Merge remote-tracking branch 'public/solaris_warnings_028'Nick Mathewson
2016-09-11Add some clarifications in the comments. Bug 19209Carolin Zöbelein
2016-09-09make check-spacesNick Mathewson
2016-09-09Fix a coupole of coverity complaints.Nick Mathewson
2016-09-09Fix cases where the tests were doing closesocket() on a non-socketNick Mathewson
These seem to have caused warnings on windows. Hmmm.
2016-09-09Oh dear, I was missing an extern.Nick Mathewson
2016-09-09Make a couple more tests run faster.Nick Mathewson
The point of diminishing returns has been reached.
2016-09-09Disable a single pbkdf2 test vectorNick Mathewson
The other test vectors are pretty complete, and get full coverage, I believe. This one test vector accounted for half the time spent in test-slow. "Now that's slow!"
2016-09-09Chop another ~93 RSA key generations out of the unit testsNick Mathewson
We have a mock for our RSA key generation function, so we now wire it to pk_generate(). This covers all the cases that were not using pk_generate() before -- all ~93 of them.
2016-09-09Move the donna-fuzzing tests into test_slow.Nick Mathewson
This shaves another 3-4 seconds off the main-path tests for me, which is again worth it, according to XKCD#1204.
2016-09-09Re-enable RSA cacheing in tests, with a better design.Nick Mathewson
This makes tests faster and saves about 6 seconds for me, which makes it worth it, according to https://xkcd.com/1205.
2016-09-09Document the default PathsNeededToBuildCircuits valueteor
... when the directory authorities don't set min_paths_for_circs_pct. Fixes bug 20117; bugfix on 02c320916e02 in tor-0.2.4.10-alpha. Reported by Jesse V.
2016-09-08Reinstate a couple of teardown_capture_of_logs that I missedNick Mathewson
Patch from rubiate. See #19999
2016-09-08Placate "make check-spaces"Nick Mathewson
2016-09-08Fix remaining test warnings. (in test_relay.c)Nick Mathewson
2016-09-08Fix typo error in bug warning in relay.cNick Mathewson
2016-09-08capture and detect expected BUG messages in shared-random testsNick Mathewson
2016-09-08Simplify log_test_helpers interfaceNick Mathewson
Previously, you needed to store the previous log severity in a local variable, and it wasn't clear if you were allowed to call these functions more than once.
2016-09-08Resolve more BUG warnings in the unit testsNick Mathewson
2016-09-08Fix bug warnings in test_circuitlist.Nick Mathewson
2016-09-08Treat all nonfatal assertion failures as unit test failures.Nick Mathewson
Part of 19999.