Commit Graph

34292 Commits

Author SHA1 Message Date
George Kadianakis
9395a0c765 hsv3: Remove support for client auth nicknames.
Because the function that parses client auth credentials saved on
disk (parse_auth_file_content()) is not future compatible, there is no way to
add support for storing the nickname on the disk. Hence, nicknames cannot
persist after Tor restart making them pretty much useless.

In the future we can introduce nicknames by adding a new file format for client
auth credentials, but this was not deemed worth doing at this stage.
2019-12-03 09:22:17 -05:00
George Kadianakis
c7c9899bc4 hsv3: Add tests for permanently storing auth credentials.
Remove Permanent flag from old tests, and make a new test that does all the
permanent things.
2019-12-03 09:22:17 -05:00
George Kadianakis
70572b9abd hsv3: Implement permanent storage of auth credentials.
- See hs_client_register_auth_credentials() for the entry point.
- Also set the permanent flag for credentials we read from the filesystem.
- Also add some missing documentation.
2019-12-03 09:22:17 -05:00
teor
68b6d85248
Merge branch 'maint-0.4.2'
Merge tor_free() notes with whitespace fixes.
2019-11-25 12:52:10 +10:00
teor
eb81704081
CodingStandards: Use consistent spacing
* 2 newlines before ====== headers
* 1 newline before ------ headers
2019-11-25 12:50:15 +10:00
teor
03867b3dd7
Merge branch 'maint-0.4.2' 2019-11-25 12:37:26 +10:00
teor
3d6545250e
Merge branch 'maint-0.4.1' into maint-0.4.2 2019-11-25 12:37:15 +10:00
teor
26071aa3be
Merge branch 'maint-0.4.0' into maint-0.4.1 2019-11-25 12:37:07 +10:00
teor
055f5d4d1b
Merge branch 'maint-0.3.5' into maint-0.4.0 2019-11-25 12:36:59 +10:00
teor
c17ab20ac0
Merge remote-tracking branch 'tor-github/pr/1441' into maint-0.4.0 2019-11-25 12:36:41 +10:00
teor
ed6f2f61a2
Merge remote-tracking branch 'tor-github/pr/1396' into maint-0.4.0 2019-11-25 12:35:58 +10:00
teor
501b5174d8
Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.3.5 2019-11-25 12:35:11 +10:00
teor
400cee261e
Merge remote-tracking branch 'tor-github/pr/1422' into maint-0.3.5 2019-11-25 12:34:29 +10:00
teor
54c01119ed
Merge remote-tracking branch 'tor-github/pr/1405' into maint-0.3.5 2019-11-25 12:33:55 +10:00
teor
83424cb62f
Merge remote-tracking branch 'tor-github/pr/1395' into maint-0.3.5 2019-11-25 12:33:14 +10:00
teor
f9812ee5f7
Merge remote-tracking branch 'tor-github/pr/1394' into maint-0.3.5 2019-11-25 12:29:43 +10:00
teor
e6ceded7d8
Merge remote-tracking branch 'tor-github/pr/1557' 2019-11-25 12:24:22 +10:00
teor
969ee5d77f
CodingStandards: Use the correct changes file format
And remove a duplicate description of the format.

Obviously correct changes to documentation.
2019-11-25 11:44:22 +10:00
Nick Mathewson
d9d75d4ae1 rename_c_identifier: don't crash when doing only one replacement. 2019-11-23 15:30:18 -05:00
Nick Mathewson
ff7d0ebcfe Fix a low-impact memory leak in options_act_reversible()
Found by Coverity as CID 1455953

Fixes bug 32575; bug not in any released Tor.
2019-11-22 09:04:36 -05:00
Nick Mathewson
cf22841e3b ht.h: improve documentation for HT_NEXT_RMV. 2019-11-21 11:56:42 -05:00
Nick Mathewson
da15448eb8 Merge branch 'ticket32209' 2019-11-21 08:26:20 -05:00
Nick Mathewson
55fac8dafc config.md: suggestions from teor 2019-11-21 08:26:12 -05:00
Nick Mathewson
d8ff7d0236 Merge branch 'reversible_3' 2019-11-21 07:49:18 -05:00
George Kadianakis
f23d4df091 Merge branch 'tor-github/pr/1555' 2019-11-21 13:03:44 +02:00
David Goulet
cb11276068 hs-v3: Add changes file for ticket #30382
Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-11-21 13:02:29 +02:00
David Goulet
709d7fba11 hs-v3: Return bad address SOCKS5 extended error
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-21 13:02:29 +02:00
Nick Mathewson
fe68d83b24 Merge branch 'bug32555' 2019-11-20 13:31:32 -05:00
Nick Mathewson
b33f3c960d options_act_reversible: add more comments to explain ordering 2019-11-20 09:49:25 -05:00
Nick Mathewson
a3d06179ce Typo/grammar fixes. 2019-11-20 09:28:12 -05:00
Nick Mathewson
acb97cfa68 log config: Set safelogging_changed even if we aren't running Tor. 2019-11-20 09:26:47 -05:00
Nick Mathewson
89c355b386 Some tests for log changes, commit, and rollback 2019-11-20 09:26:47 -05:00
Nick Mathewson
a30d143228 Make KeyDirectory's GroupReadable behave the same as CacheDirectory's.
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-20 09:26:47 -05:00
Nick Mathewson
3094651fa3 New unit tests for options_create_directories(). 2019-11-20 09:26:47 -05:00
Nick Mathewson
9951afe177 parseconf test: ControlSocketsGroupWriteable without ControlSocket. 2019-11-20 09:26:47 -05:00
Nick Mathewson
cd8c96ce02 Typo fix in warning message about ControlSocket 2019-11-20 09:26:47 -05:00
Nick Mathewson
cf7580ab06 Free options objects for which validation fails.
Also free options objects when we discard them due to
TestingTorOptions.

Fixes bug 32555; bug not in any released Tor.
2019-11-20 09:14:08 -05:00
Nick Mathewson
929b46f44a Split listener configuration out of options_act_reversible() 2019-11-19 16:05:07 -05:00
Nick Mathewson
5060007f4b Split log configuration out of options_act_reversible(). 2019-11-19 16:03:32 -05:00
Nick Mathewson
20c24e72d9 options_act_reversible(): Extract more startup-only pieces.
These have to happen after opening listeners and before opening logs :/
2019-11-19 16:03:10 -05:00
Nick Mathewson
006ce47ffa Extract a function for one-time-only pre-reversible options.
These changes _only_ happen at startup, and happen before _any_
reversible option change is set.
2019-11-19 16:03:10 -05:00
Nick Mathewson
effed7fb1c Move some ControlSocket checks to options_validate_cb()
There is no reason for them be in options_act_reversible().
2019-11-19 16:03:10 -05:00
George Kadianakis
21b3303657 Rename REGISTER_SUCCESS_ALSO_DECRYPTED to REGISTER_SUCCESS_AND_DECRYPTED. 2019-11-18 19:21:45 +02:00
George Kadianakis
97fd75169d Various minor improvements after David's review.
- Fix a wrong log message
- Introduce a cap for the nickname size
- Change some 'if' statements to 'switch'.
2019-11-18 19:21:41 +02:00
George Kadianakis
ce422a9d4a hs-v3: Decrypt pending descriptors when we get new client auth creds. 2019-11-18 19:21:34 +02:00
George Kadianakis
53ac9a9a91 Add changes file for #30381. 2019-11-18 19:21:10 +02:00
George Kadianakis
b996d55bcd control-port: Tests for ONION_CLIENT_AUTH_VIEW. 2019-11-18 19:19:10 +02:00
George Kadianakis
db6a48b6bf control-port: Implement ONION_CLIENT_AUTH_VIEW. 2019-11-18 19:19:00 +02:00
George Kadianakis
ee4b2287c6 control-port: Tests for ONION_CLIENT_AUTH_REMOVE. 2019-11-18 19:18:56 +02:00
George Kadianakis
8330b4dc2a control-port: Implement ONION_CLIENT_AUTH_REMOVE. 2019-11-18 19:18:49 +02:00