Nick Mathewson
a57bcffcc7
Implement the various get_foodir_*() functions.
2017-12-05 19:49:29 -05:00
Nick Mathewson
a9806af261
Create a CacheDirectory and KeyDirectory options.
...
They work the same as DataDirectory, but default slightly different.
Tor is not actually updated to use them yet.
2017-12-05 19:49:28 -05:00
Nick Mathewson
39a780e85a
Clean up a needlessly complex get_datadir_fname use
2017-12-05 19:49:28 -05:00
Nick Mathewson
3907faf2fd
New accessors for keydir/cachedir access
...
This patch is a result of auditing all of our uses of
get_datadir_fname() and its kin, and dividing them into cache vs
keys vs other data.
The new get_keydir_fname() and get_cachedir_fname() functions don't
actually do anything new yet.
2017-12-05 19:49:28 -05:00
Nick Mathewson
7b34ab3e38
Extract common code for creating the keys directory.
...
This had somehow gotten duplicated between router.c and routerkeys.c
2017-12-05 19:49:28 -05:00
Nick Mathewson
2e872f6b32
Use get_datadir_fname() accessor in networkstatus.c
2017-12-05 19:49:28 -05:00
Nick Mathewson
36779df4c4
Extract the code that creates the datadir into a separate function.
2017-12-05 19:49:28 -05:00
Nick Mathewson
6aeabd454e
Reindent the body of get_data_directory()
...
I don't know why it wasn't indented properly, but we may as well fix
it now.
2017-11-14 15:56:25 -05:00
Nick Mathewson
192be00691
Make the DataDirectory option immutable.
...
By convention, the torrc options that the user sets are
unchangeable. If we need to change them, we should be using a copy
that's stored in another field
To avoid trouble, I'm keeping DataDirectory as the name for the
field that the rest of Tor uses, and using DataDirectory_option for
the confparse-controlled field.
This commit also modernizes some older string handling code in the
DataDirectory normalization function.
2017-11-14 15:54:36 -05:00
Nick Mathewson
bf8a7201ce
Remove remove_file_if_very_old() -- nothing calls it.
2017-11-14 15:33:58 -05:00
Nick Mathewson
702a13c9d3
Merge branch 'maint-0.3.2'
2017-11-14 14:45:11 -05:00
Nick Mathewson
6dc784bdb3
Merge remote-tracking branch 'dgoulet/bug24230_032_01' into maint-0.3.2
2017-11-14 14:45:07 -05:00
Nick Mathewson
0c6d05cdd4
Merge branch 'maint-0.3.2'
2017-11-13 12:27:44 -05:00
Nick Mathewson
d0b75b5ade
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-11-13 12:27:36 -05:00
David Goulet
7df28ce299
hs-v3: Fix consensus param "hsdir-interval" name
...
The dir-spec.txt specifies it to be "hsdir_interval" (underscore).
Fixes #24262
Signed-off-by: David Goulet <dgoulet@torproject.org >
2017-11-13 11:48:56 -05:00
Nick Mathewson
0b4e59b7c6
Merge remote-tracking branch 'sebastian/bug24137'
2017-11-13 11:32:35 -05:00
Nick Mathewson
3300a6e93a
Merge remote-tracking branch 'arma/ticket23637' into maint-0.3.2
2017-11-13 11:20:20 -05:00
Nick Mathewson
91188540af
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-11-13 11:18:02 -05:00
Nick Mathewson
16bdb9e365
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-11-13 11:18:02 -05:00
Nick Mathewson
ab415ae950
Merge remote-tracking branch 'teor/bug23470-029' into maint-0.2.9
2017-11-13 11:17:58 -05:00
Nick Mathewson
9092e9019a
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-11-13 11:15:50 -05:00
Nick Mathewson
666653758d
Merge branch 'bug8185_025' into maint-0.2.9
2017-11-13 11:15:47 -05:00
Nick Mathewson
0fc2b7f82e
Merge branch 'bug8185_031' into maint-0.3.1
2017-11-13 11:15:40 -05:00
Nick Mathewson
ece63105d9
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-11-13 11:13:22 -05:00
Nick Mathewson
c928fb988a
Merge branch 'ticket21953_029' into maint-0.2.9
2017-11-13 11:13:18 -05:00
Nick Mathewson
fdefda95bc
Add corresponding rust-c coupling comments to C
2017-11-13 10:03:46 -05:00
Nick Mathewson
edf3d6b7ee
Merge remote-tracking branch 'chelseakomlo/24032-cargo-rust-sync'
2017-11-13 09:59:10 -05:00
Nick Mathewson
a5ef2b619d
Make node_get_curve25519_onion_key() return a const ptr
2017-11-12 17:07:16 -05:00
Nick Mathewson
f92736517b
Merge branch 'bug23577_squashed'
2017-11-12 17:05:39 -05:00
Neel Chauhan
fb718e9912
Make setup_introduce1_data() take a node_t instead of an extend_info_t
...
Clients add rendezvous point IPv6 addresses to introduce cell link specifiers,
when the node has a valid IPv6 address.
Also check the node's IPv4 address is valid before adding any link specifiers.
Implements #23577 .
2017-11-12 17:05:25 -05:00
Neel Chauhan
0ee50a414c
Introduce node_get_curve25519_onion_key()
2017-11-12 17:05:25 -05:00
Chelsea Holland Komlo
1c50331b9a
annotate where C and Rust need to stay in sync
2017-11-11 23:19:34 -05:00
Nick Mathewson
11eaf208c0
Merge branch 'bug24247_032'
2017-11-11 14:46:33 -05:00
Nick Mathewson
a7ca71cf6b
Fix mock_crypto_pk_public_checksig__nocheck() to handle short RSA keys
...
This function -- a mock replacement used only for fuzzing -- would
have a buffer overflow if it got an RSA key whose modulus was under
20 bytes long.
Fortunately, Tor itself does not appear to have a bug here.
Fixes bug 24247; bugfix on 0.3.0.3-alpha when fuzzing was
introduced. Found by OSS-Fuzz; this is OSS-Fuzz issue 4177.
2017-11-11 14:44:45 -05:00
Nick Mathewson
ef92511577
Merge branch 'maint-0.3.0' into maint-0.3.1
2017-11-11 12:23:34 -05:00
Nick Mathewson
512dfa15ed
Merge branch 'maint-0.3.1' into maint-0.3.2
2017-11-11 12:23:34 -05:00
Nick Mathewson
f8707e4f6c
Merge branch 'maint-0.3.2'
2017-11-11 12:23:34 -05:00
Nick Mathewson
5348c8996f
Merge branch 'maint-0.2.9' into maint-0.3.0
2017-11-11 12:23:33 -05:00
Nick Mathewson
9666c620d5
Merge branch 'maint-0.2.8' into maint-0.2.9
2017-11-11 12:23:33 -05:00
Nick Mathewson
c9b76a12f5
Merge branch 'maint-0.2.5' into maint-0.2.8
2017-11-11 12:23:33 -05:00
David Goulet
42ce6f78c8
control: Fix wrong Action on failure to upload an HS descriptor
...
On failure to upload, the HS_DESC event would report "UPLOAD_FAILED" as the
Action but it should have reported "FAILED" according to the spec.
Fixes #24230
Signed-off-by: David Goulet <dgoulet@torproject.org >
2017-11-10 15:31:31 -05:00
Karsten Loesing
6f8c32b7de
Update geoip and geoip6 to the November 6 2017 database.
2017-11-10 10:14:09 +01:00
Nick Mathewson
039a776367
slight improvement to rust idiomicity
2017-11-09 09:48:52 -05:00
Nick Mathewson
c80bb04542
Rust implementation of protocol_list_supports_protocol_or_later()
2017-11-09 09:42:09 -05:00
Nick Mathewson
6ea3db6fa7
Fix unit test behavior: we need to be in STATE_LIVE.
2017-11-09 09:30:43 -05:00
Nick Mathewson
552218437c
Merge branch 'ticket12062_squashed'
2017-11-09 09:20:55 -05:00
Nick Mathewson
0c6eabf088
Audit all of the "is the network turned off" checks.
...
DisableNetwork is a subset of net_is_disabled(), which is (now) a
subset of should_delay_dir_fetches().
Some of these changes are redundant with others higher or lower in
the call stack. The ones that I think are behavior-relevant are
listed in the changes file. I've also added comments in a few
places where the behavior is subtle.
Fixes bug 12062; bugfix on various versions.
2017-11-09 09:19:42 -05:00
Nick Mathewson
0626031564
Merge branch 'ticket20895'
2017-11-09 09:17:53 -05:00
Nick Mathewson
59c1016aba
Merge branch 'maint-0.3.2'
2017-11-09 08:17:46 -05:00
Nick Mathewson
aa1d90b40c
Merge branch 'bug23985_029' into maint-0.3.2
2017-11-09 08:15:46 -05:00