mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 14:23:30 +01:00
Make rend_authorized_client_free public
This is needed by control.c. Also, check whether client_name is set before doing memwipe.
This commit is contained in:
parent
896271d525
commit
e7ff23beea
@ -183,13 +183,14 @@ num_rend_services(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Helper: free storage held by a single service authorized client entry. */
|
/** Helper: free storage held by a single service authorized client entry. */
|
||||||
static void
|
void
|
||||||
rend_authorized_client_free(rend_authorized_client_t *client)
|
rend_authorized_client_free(rend_authorized_client_t *client)
|
||||||
{
|
{
|
||||||
if (!client)
|
if (!client)
|
||||||
return;
|
return;
|
||||||
if (client->client_key)
|
if (client->client_key)
|
||||||
crypto_pk_free(client->client_key);
|
crypto_pk_free(client->client_key);
|
||||||
|
if (client->client_name)
|
||||||
memwipe(client->client_name, 0, strlen(client->client_name));
|
memwipe(client->client_name, 0, strlen(client->client_name));
|
||||||
tor_free(client->client_name);
|
tor_free(client->client_name);
|
||||||
memwipe(client->descriptor_cookie, 0, sizeof(client->descriptor_cookie));
|
memwipe(client->descriptor_cookie, 0, sizeof(client->descriptor_cookie));
|
||||||
|
@ -106,6 +106,8 @@ rend_service_port_config_t *rend_service_parse_port_config(const char *string,
|
|||||||
char **err_msg_out);
|
char **err_msg_out);
|
||||||
void rend_service_port_config_free(rend_service_port_config_t *p);
|
void rend_service_port_config_free(rend_service_port_config_t *p);
|
||||||
|
|
||||||
|
void rend_authorized_client_free(rend_authorized_client_t *client);
|
||||||
|
|
||||||
/** Return value from rend_service_add_ephemeral. */
|
/** Return value from rend_service_add_ephemeral. */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RSAE_BADVIRTPORT = -4, /**< Invalid VIRTPORT/TARGET(s) */
|
RSAE_BADVIRTPORT = -4, /**< Invalid VIRTPORT/TARGET(s) */
|
||||||
|
Loading…
Reference in New Issue
Block a user