diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-14 16:18:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-12-05 19:49:28 -0500 |
commit | 7b34ab3e384b5c72e938d11e5e05c72b9d529bb8 (patch) | |
tree | 58bfece83dc694baf4e75a9127a1c7371e589824 /src/or/config.h | |
parent | 2e872f6b32edaace096180c249934c620cd3ce35 (diff) | |
download | tor-7b34ab3e384b5c72e938d11e5e05c72b9d529bb8.tar.gz tor-7b34ab3e384b5c72e938d11e5e05c72b9d529bb8.zip |
Extract common code for creating the keys directory.
This had somehow gotten duplicated between router.c and routerkeys.c
Diffstat (limited to 'src/or/config.h')
-rw-r--r-- | src/or/config.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/config.h b/src/or/config.h index efdd8c59b0..de9858a25b 100644 --- a/src/or/config.h +++ b/src/or/config.h @@ -72,6 +72,10 @@ MOCK_DECL(char *, * get_datadir_fname2_suffix. */ #define get_datadir_fname2(sub1,sub2) \ get_datadir_fname2_suffix((sub1), (sub2), NULL) +/** Return a newly allocated string containing datadir/sub1 relative to + * opts. See get_datadir_fname2_suffix. */ +#define options_get_datadir_fname(opts,sub1) \ + options_get_datadir_fname2_suffix((opts),(sub1), NULL, NULL) /** Return a newly allocated string containing datadir/sub1/sub2 relative to * opts. See get_datadir_fname2_suffix. */ #define options_get_datadir_fname2(opts,sub1,sub2) \ @@ -83,6 +87,8 @@ MOCK_DECL(char *, int using_default_dir_authorities(const or_options_t *options); +int create_keys_directory(const or_options_t *options); + int check_or_create_data_subdir(const char *subdir); int write_to_data_subdir(const char* subdir, const char* fname, const char* str, const char* descr); |