diff options
author | Neel Chauhan <neel@neelc.org> | 2020-12-03 17:40:55 -0800 |
---|---|---|
committer | Neel Chauhan <neel@neelc.org> | 2020-12-03 17:40:55 -0800 |
commit | 7d54734900e3a11f007d9fdff1188be7cc2e7a01 (patch) | |
tree | 03a7092d736997f29f6c254b15f40514addb992c /src/feature/control | |
parent | be6db23d1d4ce1185a7263f8554978e0fb9ea821 (diff) | |
download | tor-7d54734900e3a11f007d9fdff1188be7cc2e7a01.tar.gz tor-7d54734900e3a11f007d9fdff1188be7cc2e7a01.zip |
More logic corrections
Diffstat (limited to 'src/feature/control')
-rw-r--r-- | src/feature/control/control_cmd.c | 5 | ||||
-rw-r--r-- | src/feature/control/control_cmd.h | 11 |
2 files changed, 3 insertions, 13 deletions
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c index 8df9598c9f..4dccf2b249 100644 --- a/src/feature/control/control_cmd.c +++ b/src/feature/control/control_cmd.c @@ -1649,7 +1649,7 @@ handle_control_hspost(control_connection_t *conn, * On success (RSAE_OKAY), the address_out points to a newly allocated string * containing the onion address without the .onion part. On error, address_out * is untouched. */ -STATIC hs_service_add_ephemeral_status_t +static hs_service_add_ephemeral_status_t add_onion_helper_add_service(int hs_version, add_onion_secret_key_t *pk, smartlist_t *port_cfgs, int max_streams, @@ -1831,7 +1831,7 @@ handle_control_add_onion(control_connection_t *conn, } } else if (!strcasecmp(arg->key, "ClientAuthV3")) { hs_service_authorized_client_t *client_v3 = - parse_authorized_client_key(arg->value, false); + parse_authorized_client_key(arg->value, LOG_INFO); if (!client_v3) { control_write_endreply(conn, 512, "Cannot decode v3 client auth key"); goto out; @@ -1926,6 +1926,7 @@ handle_control_add_onion(control_connection_t *conn, auth_clients, auth_clients_v3, &service_id); port_cfgs = NULL; /* port_cfgs is now owned by the rendservice code. */ auth_clients = NULL; /* so is auth_clients */ + auth_clients_v3 = NULL; /* so is auth_clients_v3 */ switch (ret) { case RSAE_OKAY: { diff --git a/src/feature/control/control_cmd.h b/src/feature/control/control_cmd.h index 56ffb9f661..0ff0f0755f 100644 --- a/src/feature/control/control_cmd.h +++ b/src/feature/control/control_cmd.h @@ -103,17 +103,6 @@ STATIC control_cmd_args_t *control_cmd_parse_args( size_t body_len, const char *body, char **error_out); -#ifdef TOR_UNIT_TESTS -#include "feature/hs/hs_common.h" - -STATIC hs_service_add_ephemeral_status_t -add_onion_helper_add_service(int hs_version, - add_onion_secret_key_t *pk, - smartlist_t *port_cfgs, int max_streams, - int max_streams_close_circuit, int auth_type, - smartlist_t *auth_clients, - smartlist_t *auth_clients_v3, char **address_out); -#endif /* defined(TOR_UNIT_TESTS) */ #endif /* defined(CONTROL_CMD_PRIVATE) */ |