aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-11-26test: Fix a python double-spaceteor
2019-11-25Merge branch 'stream-socks-auth' into bug19859_mergedNick Mathewson
2019-11-22Fix a low-impact memory leak in options_act_reversible()Nick Mathewson
Found by Coverity as CID 1455953 Fixes bug 32575; bug not in any released Tor.
2019-11-21ht.h: improve documentation for HT_NEXT_RMV.Nick Mathewson
2019-11-21Merge branch 'ticket32209'Nick Mathewson
2019-11-21config.md: suggestions from teorNick Mathewson
2019-11-21Merge branch 'reversible_3'Nick Mathewson
2019-11-21Merge branch 'tor-github/pr/1555'George Kadianakis
2019-11-21hs-v3: Return bad address SOCKS5 extended errorDavid Goulet
If ExtendedErrors is set for the SocksPort, an invalid .onion address now returns the 0xF6 error code per prop304. Closes #30022 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-20options_act_reversible: add more comments to explain orderingNick Mathewson
2019-11-20Typo/grammar fixes.Nick Mathewson
2019-11-20log config: Set safelogging_changed even if we aren't running Tor.Nick Mathewson
2019-11-20Some tests for log changes, commit, and rollbackNick Mathewson
2019-11-20Make KeyDirectory's GroupReadable behave the same as CacheDirectory's.Nick Mathewson
In #26913 we solved a bug where CacheDirectoryGroupReadable would override DataDirectoryGroupReadable when the two directories are the same. We never did the same for KeyDirectory, though, because that's a rare setting. Now that I'm testing this code, though, fixing this issue seems fine. Fixes bug #27992; bugfix on 0.3.3.1-alpha.
2019-11-20New unit tests for options_create_directories().Nick Mathewson
2019-11-20parseconf test: ControlSocketsGroupWriteable without ControlSocket.Nick Mathewson
2019-11-20Typo fix in warning message about ControlSocketNick Mathewson
2019-11-20Free options objects for which validation fails.Nick Mathewson
Also free options objects when we discard them due to TestingTorOptions. Fixes bug 32555; bug not in any released Tor.
2019-11-19Split listener configuration out of options_act_reversible()Nick Mathewson
2019-11-19Split log configuration out of options_act_reversible().Nick Mathewson
2019-11-19options_act_reversible(): Extract more startup-only pieces.Nick Mathewson
These have to happen after opening listeners and before opening logs :/
2019-11-19Extract a function for one-time-only pre-reversible options.Nick Mathewson
These changes _only_ happen at startup, and happen before _any_ reversible option change is set.
2019-11-19Move some ControlSocket checks to options_validate_cb()Nick Mathewson
There is no reason for them be in options_act_reversible().
2019-11-18Rename REGISTER_SUCCESS_ALSO_DECRYPTED to REGISTER_SUCCESS_AND_DECRYPTED.George Kadianakis
2019-11-18Various minor improvements after David's review.George Kadianakis
- Fix a wrong log message - Introduce a cap for the nickname size - Change some 'if' statements to 'switch'.
2019-11-18hs-v3: Decrypt pending descriptors when we get new client auth creds.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_VIEW.George Kadianakis
2019-11-18control-port: Implement ONION_CLIENT_AUTH_VIEW.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_REMOVE.George Kadianakis
2019-11-18control-port: Implement ONION_CLIENT_AUTH_REMOVE.George Kadianakis
2019-11-18control-port: Tests for ONION_CLIENT_AUTH_ADD.George Kadianakis
2019-11-18control-port: Implement ONION_CLIENT_AUTH_ADD.George Kadianakis
2019-11-18Merge branch 'tor-github/pr/1423'George Kadianakis
2019-11-18test: Unit test for the hs cache decrypt on new authDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18test: Unit test for the SOCKS5 HS client auth errorsDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Improve documentation of hs_cache_client_descriptor_tDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Function to re-parse unencrypted descriptorDavid Goulet
We now keep descriptor that we can't decode due to missing client authorization in the cache. This new function is used when new client authorization are added and to tell the client cache to retry decoding. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Refactor descriptor dir fetch done codeDavid Goulet
This commit extract most of the code that dirclient.c had to handle the end of a descriptor directory requests (fetch). It is moved into hs_client.c in order to have one single point of entry and the rest is fully handled by the HS subsystem. As part of #30382, depending on how the descriptor ended up stored (decoded or not), different SOCKS error code can be returned. Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Set extended error if .onion is invalidDavid Goulet
In order to achieve this, the parse_extended_hostname() had to be refactored to return either success or failure and setting the hostname type in the given parameter. The reason for that is so it can detect invalid onion addresses that is having a ".onion", the right length but just not passing validation. That way, we can send back the prop304 ExtendedError "X'F1' Onion Service Descriptor Is Invalid" to notify the SOCKS connection of the invalid onion address. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Set extended error when missing/bad client authDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Set extended error when descriptor is not foundDavid Goulet
Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Return descriptor decoding status when storing as clientDavid Goulet
This will allow us to callback into the HS subsytem depending on the decoding status and return an extended SOCKS5 error code depending on the decoding issue. This is how we'll be able to tell the SocksPort connection if we are missing or have bad client authorization for a service. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18hs-v3: Keep descriptor in cache if client auth is missing or badDavid Goulet
We now keep the descriptor in the cache, obviously not decoded, if it can't be decrypted for which we believe client authorization is missing or unusable (bad). This way, it can be used later once the client authorization are added or updated. Part of #30382 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-18Merge remote-tracking branch 'tor-github/pr/1517'teor
2019-11-16Merge remote-tracking branch 'tor-github/pr/1545'Nick Mathewson
2019-11-16Merge remote-tracking branch 'tor-github/pr/1544'Nick Mathewson
2019-11-16Make structs declared by tor_queues.h macros also follow naming rulesNick Mathewson
2019-11-16map.h: replace maptype with mapname_tNick Mathewson
This change makes our macro bodies consistent with our naming expectations for structs and types outside macro bodies.
2019-11-16handles.h: replace structname with structname_tNick Mathewson
This change makes our macro bodies consistent with our naming expectations for structs and types outside macro bodies.
2019-11-16Revise struct names in examples in comments to end with _tNick Mathewson