diff options
author | Suphanat Chunhapanya <haxx.pop@gmail.com> | 2018-08-19 08:26:43 +0700 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-09-07 13:59:22 -0400 |
commit | 9c362192361bec379f83f37426236b41c2a17e8e (patch) | |
tree | c305d490b88392182033337c04b8cdcd8c80f3cf /src/feature/hs/hs_client.c | |
parent | 8e81fcd51ae9b9b373f0254381728a8f4d93236d (diff) | |
download | tor-9c362192361bec379f83f37426236b41c2a17e8e.tar.gz tor-9c362192361bec379f83f37426236b41c2a17e8e.zip |
test: HS v3 client authorization loading secret key
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/hs/hs_client.c')
-rw-r--r-- | src/feature/hs/hs_client.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c index 7c545c35d5..18c79e0c47 100644 --- a/src/feature/hs/hs_client.c +++ b/src/feature/hs/hs_client.c @@ -1428,7 +1428,7 @@ client_service_authorization_free_all(void) /* Check if the auth key file name is valid or not. Return 1 if valid, * otherwise return 0. */ -static int +STATIC int auth_key_filename_is_valid(const char *filename) { int ret = 1; @@ -1448,7 +1448,7 @@ auth_key_filename_is_valid(const char *filename) return ret; } -static hs_client_service_authorization_t * +STATIC hs_client_service_authorization_t * parse_auth_file_content(const char *client_key_str) { char *onion_address = NULL; @@ -1836,3 +1836,13 @@ hs_client_dir_info_changed(void) * AP_CONN_STATE_RENDDESC_WAIT state in order to fetch the descriptor. */ retry_all_socks_conn_waiting_for_desc(); } + +#ifdef TOR_UNIT_TESTS + +STATIC digest256map_t * +get_hs_client_auths_map(void) +{ + return client_auths; +} + +#endif /* defined(TOR_UNIT_TESTS) */ |