summaryrefslogtreecommitdiff
path: root/src/or/rendservice.c
AgeCommit message (Collapse)Author
2016-12-16Merge branch 'prop271_030_v1_squashed'Nick Mathewson
2016-12-14whitespace fixesNick Mathewson
2016-12-14Merge branch 'dgoulet_ticket19043_030_03_squashed'Nick Mathewson
2016-12-14prop224 prepwork: Finish decoupling old ESTABLISH_INTRO creation logic.George Kadianakis
2016-12-14prpo224 prepwork: Decouple legacy ESTABLISH_INTRO creation logic.George Kadianakis
This commit only moves code.
2016-12-05Merge remote-tracking branch 'chelseakomlo/20717_hashing_api_bug'Nick Mathewson
2016-12-04Use `rend_service_is_ephemeral` for all service checks in `rendservice.c`J. Ryan Stinnett
Fixes #20853.
2016-12-03Use a temporary service list when validating and adding hidden servicesteor
This resolves two issues: * the checks in rend_add_services were only being performed when adding the service, and not when the service was validated, (this meant that duplicate checks were not being performed, and some SETCONF commands appeared to succeed when they actually failed), and * if one service failed while services were being added, then the service list would be left in an inconsistent state (tor dies when this happens, but the code is cleaner now). Fixes #20860.
2016-12-03Add a missing rend_service_free in rend_service_addteor
2016-12-03Clarify the function documentation for rend_get_service_list_mutableteor
Comment-only change
2016-12-01Stop ignoring misconfigured hidden servicesteor
Instead, refuse to start tor until the misconfigurations have been corrected. Fixes bug 20559; bugfix on multiple commits in 0.2.7.1-alpha and earlier.
2016-12-01Refactor rend_service_list substitute list selection codeteor
Remove duplicate code. No behaviour change.
2016-12-01Merge branch 'maint-0.2.9'Nick Mathewson
2016-12-01Stop ignoring hidden service key anonymity when first starting torteor
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).
2016-12-01Update unit tests for 20484, 20529teor
Add extra logging and extra validity checks for hidden services.
2016-11-30Use the new guard notification/selection APIs throughout TorNick Mathewson
This patch doesn't cover every case; omitted cases are marked with "XXXX prop271", as usual. It leaves both the old interface and the new interface for guard status notification, since they don't actually work in the same way: the new API wants to be told when a circuit has failed or succeeded, whereas the old API wants to know when a channel has failed or succeeded. I ran into some trouble with directory guard stuff, since when we pick the directory guard, we don't actually have a circuit to associate it with. I solved that by allowing guard states to be associated with directory connections, not just circuits.
2016-11-24crypto_digest returns expected error value of -1Chelsea H. Komlo
2016-11-18Refactor rend_service_check_dir_and_addteor
Make the function flatter, and prepare for #20559. No behaviour change.
2016-11-18Refactor duplicate code out of rend_config_servicesteor
Put that code in rend_service_check_dir_and_add. No behaviour change. This is a defence in depth measure against similar bugs to 20529.
2016-11-18Create HS directories in rend_config_services, then check before useteor
(We only create HS directories if we are acting on the config.) Log a BUG warning if the directories aren't present immediately before they are used, then fail.
2016-11-17Fix and simplify error handling code in rend_service_parse_port_config()Ivan Markin
2016-11-17Fix comment for rend_service_parse_port_config()Ivan Markin
2016-11-07Merge branch 'maint-0.2.9'Nick Mathewson
Conflicts: src/or/rendservice.c
2016-11-04Merge branch 'ticket17238_029_02-resquash'Nick Mathewson
Conflicts: src/or/rendclient.c src/or/rendcommon.c src/or/routerparse.c src/test/test_dir.c src/trunnel/ed25519_cert.h
2016-11-04hs: Refactor rend_data_t for multi version supportDavid Goulet
In order to implement proposal 224, we need the data structure rend_data_t to be able to accomodate versionning that is the current version of hidden service (2) and the new version (3) and future version. For that, we implement a series of accessors and a downcast function to get the v2 data structure. rend_data_t becomes a top level generic place holder. The entire rend_data_t API has been moved to hs_common.{c|h} in order to seperate code that is shared from between HS versions and unshared code (in rendcommon.c). Closes #19024 Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: George Kadianakis <desnacked@riseup.net>
2016-11-03Split a wide lineNick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20526_030_01'Nick Mathewson
2016-11-03Merge remote-tracking branch 'dgoulet/bug20376_030_01'Nick Mathewson
2016-11-03fix wide linesNick Mathewson
2016-11-03hs: Escape service directories before printing themIvan Markin
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-02hs: Added rend_service_is_ephemeral() and made related code use itIvan Markin
Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-11-02Use the latest options in rend_service_check_private_dirteor
Fixup on both: * Refactor, adding a create argument... and * Check every hidden service directory's permissions...
2016-11-02Check every hidden service directory's permissions when configuringteor
Previously, we would only check the last hidden service directory. Fixes #20529, bugfix on ticket 13942 commit 85bfad1 in 0.2.6.2-alpha.
2016-11-02Improve comments in check_private_dir and onion poisoningteor
Comment changes only
2016-11-02fixup! Refactor, adding a create argument to rend_service_check_private_dirteor
2016-11-02Remove redundant group permission code from rend_service_check_private_dirteor
check_private_dir already does this for existing directories.
2016-11-02Refactor, adding a create argument to rend_service_check_private_dirteor
It used to be rend_service_check_and_create_private_dir, which always created the directory. No behaviour change.
2016-10-31Create single-onion-service directory before poisoning it, if neededNick Mathewson
(Also, refactor the code to create a hidden service directory into a separate funcion, so we don't have to duplicate it.) Fixes bug 20484; bugfix on 0.2.9.3-alpha.
2016-10-27Do not mark circs for close again after relay_send_command_from_edge()Ivan Markin
2016-10-27Automated change to use smartlist_add_strdupovercaffeinated
Use the following coccinelle script to change uses of smartlist_add(sl, tor_strdup(str)) to smartlist_add_strdup(sl, string) (coccinelle script from nickm via bug 20048): @@ expression a; expression b; @@ - smartlist_add + smartlist_add_strdup (a, - tor_strdup( b - ) )
2016-10-24html error in doxygen comment in rendservice.cNick Mathewson
2016-10-14Whitespace cleaningNick Mathewson
2016-10-04Allow a unix: address to contain a C-style quoted string.Nick Mathewson
Feature 18753 -- all this to allow spaces.
2016-09-14Fix a bogus memwipe length in rend_service_load_auth_keys().Nick Mathewson
Bugfix on a4f46ff8ba43b1e635bc5a8543b9354e6de02e14. Found by Coverity.
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-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-13Fix a typo in a comment in rend_consider_services_intro_pointsteor