diff options
author | Neel Chauhan <neel@neelc.org> | 2020-12-08 11:24:27 -0800 |
---|---|---|
committer | Neel Chauhan <neel@neelc.org> | 2020-12-08 11:24:27 -0800 |
commit | 8a2910461baffbf4c83905776ec2f0aa7abe23a3 (patch) | |
tree | 6abff93e5e7b449d972ffada4072b0433e5751b1 /src/feature/control | |
parent | 65d60a16d96ad6e7f824225e3b9b109783575379 (diff) | |
download | tor-8a2910461baffbf4c83905776ec2f0aa7abe23a3.tar.gz tor-8a2910461baffbf4c83905776ec2f0aa7abe23a3.zip |
Reinstate add_onion_helper_add_service() test, validate auth clients before adding them
Diffstat (limited to 'src/feature/control')
-rw-r--r-- | src/feature/control/control_cmd.c | 2 | ||||
-rw-r--r-- | src/feature/control/control_cmd.h | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/feature/control/control_cmd.c b/src/feature/control/control_cmd.c index 4dccf2b249..32c87c6daa 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, diff --git a/src/feature/control/control_cmd.h b/src/feature/control/control_cmd.h index 0ff0f0755f..b3c1d5cb2f 100644 --- a/src/feature/control/control_cmd.h +++ b/src/feature/control/control_cmd.h @@ -75,6 +75,7 @@ typedef struct control_cmd_syntax_t { } control_cmd_syntax_t; #ifdef CONTROL_CMD_PRIVATE +#include "feature/hs/hs_service.h" #include "lib/crypt_ops/crypto_ed25519.h" /* ADD_ONION secret key to create an ephemeral service. The command supports @@ -94,6 +95,14 @@ STATIC int add_onion_helper_keyarg(const char *arg, int discard_pk, int *hs_version, control_connection_t *conn); +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); + STATIC rend_authorized_client_t *add_onion_helper_clientauth(const char *arg, int *created, control_connection_t *conn); |