aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/feature/hs')
-rw-r--r--src/feature/hs/hs_cache.c4
-rw-r--r--src/feature/hs/hs_cell.c4
-rw-r--r--src/feature/hs/hs_cell.h2
-rw-r--r--src/feature/hs/hs_circuit.c2
-rw-r--r--src/feature/hs/hs_circuit.h2
-rw-r--r--src/feature/hs/hs_client.c4
-rw-r--r--src/feature/hs/hs_client.h8
-rw-r--r--src/feature/hs/hs_common.c2
-rw-r--r--src/feature/hs/hs_common.h2
-rw-r--r--src/feature/hs/hs_config.c4
-rw-r--r--src/feature/hs/hs_config.h2
-rw-r--r--src/feature/hs/hs_descriptor.c12
-rw-r--r--src/feature/hs/hs_ident.c2
-rw-r--r--src/feature/hs/hs_ident.h2
-rw-r--r--src/feature/hs/hs_ob.c15
-rw-r--r--src/feature/hs/hs_service.c26
-rw-r--r--src/feature/hs/hs_service.h10
17 files changed, 52 insertions, 51 deletions
diff --git a/src/feature/hs/hs_cache.c b/src/feature/hs/hs_cache.c
index 44cd2505fd..03e004c356 100644
--- a/src/feature/hs/hs_cache.c
+++ b/src/feature/hs/hs_cache.c
@@ -854,7 +854,7 @@ hs_cache_lookup_as_client(const ed25519_public_key_t *key)
* was not usable but the descriptor was
* still stored.
*
- * Any other codes means indicate where the error occured and the descriptor
+ * Any other codes means indicate where the error occurred and the descriptor
* was not stored. */
hs_desc_decode_status_t
hs_cache_store_as_client(const char *desc_str,
@@ -1019,7 +1019,7 @@ hs_cache_client_intro_state_purge(void)
}
/* This is called when new client authorization was added to the global state.
- * It attemps to decode the descriptor of the given service identity key.
+ * It attempts to decode the descriptor of the given service identity key.
*
* Return true if decoding was successful else false. */
bool
diff --git a/src/feature/hs/hs_cell.c b/src/feature/hs/hs_cell.c
index fc9f4a2654..8bdaa4922a 100644
--- a/src/feature/hs/hs_cell.c
+++ b/src/feature/hs/hs_cell.c
@@ -56,7 +56,7 @@ compute_introduce_mac(const uint8_t *encoded_cell, size_t encoded_cell_len,
/* First, put the encoded cell in the msg. */
memcpy(mac_msg, encoded_cell, encoded_cell_len);
offset += encoded_cell_len;
- /* Second, put the CLIENT_PK + ENCRYPTED_DATA but ommit the MAC field (which
+ /* Second, put the CLIENT_PK + ENCRYPTED_DATA but omit the MAC field (which
* is junk at this point). */
memcpy(mac_msg + offset, encrypted, (encrypted_len - DIGEST256_LEN));
offset += (encrypted_len - DIGEST256_LEN);
@@ -293,7 +293,7 @@ introduce1_set_encrypted_link_spec(trn_cell_introduce_encrypted_t *cell,
}
/** Set padding in the enc_cell only if needed that is the total length of both
- * sections are below the mininum required for an INTRODUCE1 cell. */
+ * sections are below the minimum required for an INTRODUCE1 cell. */
static void
introduce1_set_encrypted_padding(const trn_cell_introduce1_t *cell,
trn_cell_introduce_encrypted_t *enc_cell)
diff --git a/src/feature/hs/hs_cell.h b/src/feature/hs/hs_cell.h
index 2b28c44c50..5889e7c6dd 100644
--- a/src/feature/hs/hs_cell.h
+++ b/src/feature/hs/hs_cell.h
@@ -3,7 +3,7 @@
/**
* \file hs_cell.h
- * \brief Header file containing cell data for the whole HS subsytem.
+ * \brief Header file containing cell data for the whole HS subsystem.
**/
#ifndef TOR_HS_CELL_H
diff --git a/src/feature/hs/hs_circuit.c b/src/feature/hs/hs_circuit.c
index e4422c86a8..eaf99cf8b2 100644
--- a/src/feature/hs/hs_circuit.c
+++ b/src/feature/hs/hs_circuit.c
@@ -817,7 +817,7 @@ hs_circ_service_intro_has_opened(hs_service_t *service,
tor_assert(desc);
tor_assert(circ);
- /* Cound opened circuits that have sent ESTABLISH_INTRO cells or are already
+ /* Count opened circuits that have sent ESTABLISH_INTRO cells or are already
* established introduction circuits */
num_intro_circ = count_opened_desc_intro_point_circuits(service, desc);
num_needed_circ = service->config.num_intro_points;
diff --git a/src/feature/hs/hs_circuit.h b/src/feature/hs/hs_circuit.h
index 22e936e685..4dd9bf94c5 100644
--- a/src/feature/hs/hs_circuit.h
+++ b/src/feature/hs/hs_circuit.h
@@ -3,7 +3,7 @@
/**
* \file hs_circuit.h
- * \brief Header file containing circuit data for the whole HS subsytem.
+ * \brief Header file containing circuit data for the whole HS subsystem.
**/
#ifndef TOR_HS_CIRCUIT_H
diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c
index b67ff237b5..7cec2e0dce 100644
--- a/src/feature/hs/hs_client.c
+++ b/src/feature/hs/hs_client.c
@@ -329,7 +329,7 @@ retry_all_socks_conn_waiting_for_desc(void)
* a descriptor but we do have it in the cache.
*
* This can happen is tor comes back from suspend where it previously
- * had the descriptor but the intro points were not usuable. Once it
+ * had the descriptor but the intro points were not usable. Once it
* came back to life, the intro point failure cache was cleaned up and
* thus the descriptor became usable again leaving us in this code path.
*
@@ -1756,7 +1756,7 @@ remove_client_auth_creds_file(const char *filename)
goto end;
}
- log_warn(LD_REND, "Successfuly removed client auth file (%s).",
+ log_warn(LD_REND, "Successfully removed client auth file (%s).",
creds_file_path);
end:
diff --git a/src/feature/hs/hs_client.h b/src/feature/hs/hs_client.h
index 88dede8126..411fa659f2 100644
--- a/src/feature/hs/hs_client.h
+++ b/src/feature/hs/hs_client.h
@@ -3,7 +3,7 @@
/**
* \file hs_client.h
- * \brief Header file containing client data for the HS subsytem.
+ * \brief Header file containing client data for the HS subsystem.
**/
#ifndef TOR_HS_CLIENT_H
@@ -35,12 +35,12 @@ typedef enum {
/* Status code of client auth credential registration */
typedef enum {
- /* We successfuly registered these credentials */
+ /* We successfully registered these credentials */
REGISTER_SUCCESS,
/* We successfully registered these credentials, but had to replace some
* existing ones. */
REGISTER_SUCCESS_ALREADY_EXISTS,
- /* We successfuly registered these credentials, and also decrypted a cached
+ /* We successfully registered these credentials, and also decrypted a cached
* descriptor. */
REGISTER_SUCCESS_AND_DECRYPTED,
/* We failed to register these credentials, because of a bad HS address. */
@@ -51,7 +51,7 @@ typedef enum {
/* Status code of client auth credential removal */
typedef enum {
- /* We successfuly removed these credentials */
+ /* We successfully removed these credentials */
REMOVAL_SUCCESS,
/* No need to remove those credentials, because they were not there. */
REMOVAL_SUCCESS_NOT_FOUND,
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index 24d34144e4..8f3a5dfdf8 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -1814,7 +1814,7 @@ hs_get_extend_info_from_lspecs(const smartlist_t *lspecs,
/***********************************************************************/
-/** Initialize the entire HS subsytem. This is called in tor_init() before any
+/** Initialize the entire HS subsystem. This is called in tor_init() before any
* torrc options are loaded. Only for >= v3. */
void
hs_init(void)
diff --git a/src/feature/hs/hs_common.h b/src/feature/hs/hs_common.h
index 997b7298a6..4a9c7a9918 100644
--- a/src/feature/hs/hs_common.h
+++ b/src/feature/hs/hs_common.h
@@ -3,7 +3,7 @@
/**
* \file hs_common.h
- * \brief Header file containing common data for the whole HS subsytem.
+ * \brief Header file containing common data for the whole HS subsystem.
**/
#ifndef TOR_HS_COMMON_H
diff --git a/src/feature/hs/hs_config.c b/src/feature/hs/hs_config.c
index 0dad8dd6d8..7ffc7ecb96 100644
--- a/src/feature/hs/hs_config.c
+++ b/src/feature/hs/hs_config.c
@@ -16,7 +16,7 @@
* options and then put in a staging list. It will stay there until
* hs_service_load_all_keys() is called. That function is responsible to
* load/generate the keys for the service in the staging list and if
- * successful, transfert the service to the main global service list where
+ * successful, transferred the service to the main global service list where
* at that point it is ready to be used.
*
* Configuration functions are per-version and there is a main generic one for
@@ -362,7 +362,7 @@ config_validate_service(const hs_service_config_t *config)
return -1;
}
-/** Configuration funcion for a version 3 service. The given service
+/** Configuration function for a version 3 service. The given service
* object must be already allocated and passed through
* config_generic_service() prior to calling this function.
*
diff --git a/src/feature/hs/hs_config.h b/src/feature/hs/hs_config.h
index c60b4fbb5d..48c24b1a08 100644
--- a/src/feature/hs/hs_config.h
+++ b/src/feature/hs/hs_config.h
@@ -3,7 +3,7 @@
/**
* \file hs_config.h
- * \brief Header file containing configuration ABI/API for the HS subsytem.
+ * \brief Header file containing configuration ABI/API for the HS subsystem.
**/
#ifndef TOR_HS_CONFIG_H
diff --git a/src/feature/hs/hs_descriptor.c b/src/feature/hs/hs_descriptor.c
index 30a36030d1..0656224e48 100644
--- a/src/feature/hs/hs_descriptor.c
+++ b/src/feature/hs/hs_descriptor.c
@@ -186,7 +186,7 @@ build_mac(const uint8_t *mac_key, size_t mac_key_len,
crypto_digest_free(digest);
}
-/** Using a secret data and a given decriptor object, build the secret
+/** Using a secret data and a given descriptor object, build the secret
* input needed for the KDF.
*
* secret_input = SECRET_DATA | subcredential | INT_8(revision_counter)
@@ -1407,7 +1407,7 @@ build_descriptor_cookie_keys(const hs_subcredential_t *subcredential,
}
/** Decrypt the descriptor cookie given the descriptor, the auth client,
- * and the client secret key. On sucess, return 0 and a newly allocated
+ * and the client secret key. On success, return 0 and a newly allocated
* descriptor cookie descriptor_cookie_out. On error or if the client id
* is invalid, return -1 and descriptor_cookie_out is set to
* NULL. */
@@ -1433,7 +1433,7 @@ decrypt_descriptor_cookie(const hs_descriptor_t *desc,
tor_assert(!fast_mem_is_zero((char *) desc->subcredential.subcred,
DIGEST256_LEN));
- /* Catch potential code-flow cases of an unitialized private key sneaking
+ /* Catch potential code-flow cases of an uninitialized private key sneaking
* into this function. */
if (BUG(fast_mem_is_zero((char *)client_auth_sk, sizeof(*client_auth_sk)))) {
goto done;
@@ -1448,7 +1448,7 @@ decrypt_descriptor_cookie(const hs_descriptor_t *desc,
tor_assert(keystream_length > 0);
/* If the client id of auth client is not the same as the calculcated
- * client id, it means that this auth client is invaild according to the
+ * client id, it means that this auth client is invalid according to the
* client secret key client_auth_sk. */
if (tor_memneq(client->client_id, keystream, HS_DESC_CLIENT_ID_LEN)) {
goto done;
@@ -1481,7 +1481,7 @@ decrypt_descriptor_cookie(const hs_descriptor_t *desc,
* the descriptor object <b>desc</b> and <b>descriptor_cookie</b>
* to generate the right decryption keys; set <b>decrypted_out</b> to
* the plaintext. If <b>is_superencrypted_layer</b> is set, this is
- * the outter encrypted layer of the descriptor.
+ * the outer encrypted layer of the descriptor.
*
* On any error case, including an empty output, return 0 and set
* *<b>decrypted_out</b> to NULL.
@@ -2003,7 +2003,7 @@ desc_sig_is_valid(const char *b64_sig,
/* Signature length check. */
if (strlen(b64_sig) != ED25519_SIG_BASE64_LEN) {
log_warn(LD_REND, "Service descriptor has an invalid signature length."
- "Exptected %d but got %lu",
+ "Expected %d but got %lu",
ED25519_SIG_BASE64_LEN, (unsigned long) strlen(b64_sig));
goto err;
}
diff --git a/src/feature/hs/hs_ident.c b/src/feature/hs/hs_ident.c
index 1d93ff9610..53360f6e9d 100644
--- a/src/feature/hs/hs_ident.c
+++ b/src/feature/hs/hs_ident.c
@@ -4,7 +4,7 @@
/**
* \file hs_ident.c
* \brief Contains circuit and connection identifier code for the whole HS
- * subsytem.
+ * subsystem.
**/
#include "lib/crypt_ops/crypto_util.h"
diff --git a/src/feature/hs/hs_ident.h b/src/feature/hs/hs_ident.h
index f4b9b2432d..0a71602852 100644
--- a/src/feature/hs/hs_ident.h
+++ b/src/feature/hs/hs_ident.h
@@ -4,7 +4,7 @@
/**
* \file hs_ident.h
* \brief Header file containing circuit and connection identifier data for
- * the whole HS subsytem.
+ * the whole HS subsystem.
*
* \details
* This interface is used to uniquely identify a hidden service on a circuit
diff --git a/src/feature/hs/hs_ob.c b/src/feature/hs/hs_ob.c
index 9499c28d20..1b8ab121a0 100644
--- a/src/feature/hs/hs_ob.c
+++ b/src/feature/hs/hs_ob.c
@@ -120,7 +120,7 @@ get_onion_public_key(const char *value, ed25519_public_key_t *pkey_out)
}
/* We don't want the .onion so we add 2 because size - 1 is copied with
- * strlcpy() in order to accomodate the NUL byte and sizeof() counts the NUL
+ * strlcpy() in order to accommodate the NUL byte and sizeof() counts the NUL
* byte so we need to remove them from the equation. */
strlcpy(address, value, strlen(value) - sizeof(".onion") + 2);
@@ -264,10 +264,10 @@ hs_ob_parse_config_file(hs_service_config_t *config)
/** Compute all possible subcredentials for every onion master key in the given
* service config object. subcredentials_out is allocated and set as an
- * continous array containing all possible values.
+ * continuous array containing all possible values.
*
* On success, return the number of subcredential put in the array which will
- * correspond to an arry of size: n * DIGEST256_LEN where DIGEST256_LEN is the
+ * correspond to an array of size: n * DIGEST256_LEN where DIGEST256_LEN is the
* length of a single subcredential.
*
* If the given configuration object has no OB master keys configured, 0 is
@@ -300,7 +300,7 @@ compute_subcredentials(const hs_service_t *service,
/* Time to build all the subcredentials for each time period: two for each
* instance descriptor plus three for the onionbalance frontend service: the
* previous one (-1), the current one (0) and the next one (1) for each
- * configured key in order to accomodate client and service consensus skew.
+ * configured key in order to accommodate client and service consensus skew.
*
* If the client consensus after_time is at 23:00 but the service one is at
* 01:00, the client will be using the previous time period where the
@@ -356,9 +356,10 @@ compute_subcredentials(const hs_service_t *service,
* If we are not an Onionbalance instance or we are not ready to do so, this
* is a NOP.
*
- * This function is called everytime we build a new descriptor. That's because
- * we want our Onionbalance keys to always use up-to-date subcredentials both
- * for the instance (ourselves) and for the onionbalance frontend.
+ * This function is called every time we build a new descriptor. That's
+ * because we want our Onionbalance keys to always use up-to-date
+ * subcredentials both for the instance (ourselves) and for the onionbalance
+ * frontend.
*/
void
hs_ob_refresh_keys(hs_service_t *service)
diff --git a/src/feature/hs/hs_service.c b/src/feature/hs/hs_service.c
index 3d0e5dc1db..fee999cac5 100644
--- a/src/feature/hs/hs_service.c
+++ b/src/feature/hs/hs_service.c
@@ -546,7 +546,7 @@ service_intro_point_remove(const hs_service_t *service,
/* Trying all descriptors. */
FOR_EACH_DESCRIPTOR_BEGIN(service, desc) {
/* We'll try to remove the descriptor on both descriptors which is not
- * very expensive to do instead of doing loopup + remove. */
+ * very expensive to do instead of doing lookup + remove. */
digest256map_remove(desc->intro_points.map,
ip->auth_key_kp.pubkey.pubkey);
} FOR_EACH_DESCRIPTOR_END;
@@ -567,7 +567,7 @@ service_intro_point_find(const hs_service_t *service,
*
* Even if we use the same node as intro point in both descriptors, the node
* will have a different intro auth key for each descriptor since we generate
- * a new one everytime we pick an intro point.
+ * a new one every time we pick an intro point.
*
* After #22893 gets implemented, intro points will be moved to be
* per-service instead of per-descriptor so this function will need to
@@ -784,7 +784,7 @@ close_service_rp_circuits(hs_service_t *service)
ed25519_pubkey_eq(&ocirc->hs_ident->identity_pk,
&service->keys.identity_pk)) {
/* Reason is FINISHED because service has been removed and thus the
- * circuit is considered old/uneeded. When freed, it is removed from the
+ * circuit is considered old/unneeded. When freed, it is removed from the
* hs circuitmap. */
circuit_mark_for_close(TO_CIRCUIT(ocirc), END_CIRC_REASON_FINISHED);
}
@@ -802,7 +802,7 @@ close_intro_circuits(hs_service_intropoints_t *intro_points)
origin_circuit_t *ocirc = hs_circ_service_get_intro_circ(ip);
if (ocirc) {
/* Reason is FINISHED because service has been removed and thus the
- * circuit is considered old/uneeded. When freed, the circuit is removed
+ * circuit is considered old/unneeded. When freed, the circuit is removed
* from the HS circuitmap. */
circuit_mark_for_close(TO_CIRCUIT(ocirc), END_CIRC_REASON_FINISHED);
}
@@ -1086,7 +1086,7 @@ load_service_keys(hs_service_t *service)
goto end;
}
- /* Succes. */
+ /* Success. */
ret = 0;
end:
tor_free(fname);
@@ -2194,7 +2194,7 @@ pick_needed_intro_points(hs_service_t *service,
}
/* Build an exclude list of nodes of our intro point(s). The expiring intro
- * points are OK to pick again because this is afterall a concept of round
+ * points are OK to pick again because this is after all a concept of round
* robin so they are considered valid nodes to pick again. */
DIGEST256MAP_FOREACH(desc->intro_points.map, key,
hs_service_intro_point_t *, ip) {
@@ -2378,7 +2378,7 @@ should_remove_intro_point(hs_service_intro_point_t *ip, time_t now)
tor_assert(ip);
- /* Any one of the following needs to be True to furfill the criteria to
+ /* Any one of the following needs to be True to fulfill the criteria to
* remove an intro point. */
bool has_no_retries = (ip->circuit_retries >
MAX_INTRO_POINT_CIRCUIT_RETRIES);
@@ -2997,7 +2997,7 @@ upload_descriptor_to_all(const hs_service_t *service,
/* Get our list of responsible HSDir. */
responsible_dirs = smartlist_new();
/* The parameter 0 means that we aren't a client so tell the function to use
- * the spread store consensus paremeter. */
+ * the spread store consensus parameter. */
hs_get_responsible_hsdirs(&desc->blinded_kp.pubkey, desc->time_period_num,
service->desc_next == desc, 0, responsible_dirs);
@@ -3231,7 +3231,7 @@ refresh_service_descriptor(const hs_service_t *service,
hs_service_descriptor_t *desc, time_t now)
{
/* There are few fields that we consider "mutable" in the descriptor meaning
- * we need to update them regurlarly over the lifetime fo the descriptor.
+ * we need to update them regularly over the lifetime for the descriptor.
* The rest are set once and should not be modified.
*
* - Signing key certificate.
@@ -3529,7 +3529,7 @@ service_add_fnames_to_list(const hs_service_t *service, smartlist_t *list)
s_dir = service->config.directory_path;
/* The hostname file. */
smartlist_add(list, hs_path_from_filename(s_dir, fname_hostname));
- /* The key files splitted in two. */
+ /* The key files split in two. */
tor_snprintf(fname, sizeof(fname), "%s_secret_key", fname_keyfile_prefix);
smartlist_add(list, hs_path_from_filename(s_dir, fname));
tor_snprintf(fname, sizeof(fname), "%s_public_key", fname_keyfile_prefix);
@@ -3617,7 +3617,7 @@ hs_service_circuit_cleanup_on_close(const circuit_t *circ)
}
}
-/** This is called everytime the service map (v2 or v3) changes that is if an
+/** This is called every time the service map (v2 or v3) changes that is if an
* element is added or removed. */
void
hs_service_map_has_changed(void)
@@ -3907,7 +3907,7 @@ hs_service_set_conn_addr_port(const origin_circuit_t *circ,
goto err_no_close;
}
- /* Find a virtual port of that service mathcing the one in the connection if
+ /* Find a virtual port of that service matching the one in the connection if
* successful, set the address in the connection. */
if (hs_set_conn_addr_port(service->config.ports, conn) < 0) {
log_info(LD_REND, "No virtual port mapping exists for port %d for "
@@ -4240,7 +4240,7 @@ hs_service_find(const ed25519_public_key_t *identity_pk)
return find_service(hs_service_map, identity_pk);
}
-/** Allocate and initilize a service object. The service configuration will
+/** Allocate and initialize a service object. The service configuration will
* contain the default values. Return the newly allocated object pointer. This
* function can't fail. */
hs_service_t *
diff --git a/src/feature/hs/hs_service.h b/src/feature/hs/hs_service.h
index 974f46b960..ec0e83f2c2 100644
--- a/src/feature/hs/hs_service.h
+++ b/src/feature/hs/hs_service.h
@@ -3,7 +3,7 @@
/**
* \file hs_service.h
- * \brief Header file containing service data for the HS subsytem.
+ * \brief Header file containing service data for the HS subsystem.
**/
#ifndef TOR_HS_SERVICE_H
@@ -121,9 +121,9 @@ typedef struct hs_service_intropoints_t {
*
* Mutable elements are initialized when we build the descriptor but they are
* also altered during the lifetime of the descriptor. They could be
- * _refreshed_ everytime we upload the descriptor (which happens multiple times
- * over the lifetime of the descriptor), or through periodic events. We do this
- * for elements like the descriptor revision counter and various
+ * _refreshed_ every time we upload the descriptor (which happens multiple
+ * times over the lifetime of the descriptor), or through periodic events. We
+ * do this for elements like the descriptor revision counter and various
* certificates. See refresh_service_descriptor() and
* update_service_descriptor_intro_points().
*/
@@ -299,7 +299,7 @@ typedef struct hs_service_state_t {
/** Representation of a service running on this tor instance. */
typedef struct hs_service_t {
/** Onion address base32 encoded and NUL terminated. We keep it for logging
- * purposes so we don't have to build it everytime. */
+ * purposes so we don't have to build it every time. */
char onion_address[HS_SERVICE_ADDR_LEN_BASE32 + 1];
/** Hashtable node: use to look up the service by its master public identity