summaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-08-03 16:02:51 +0300
committerNick Mathewson <nickm@torproject.org>2017-08-08 20:29:34 -0400
commit5ca9b830eacf46acde56469e5f19f977e5f02668 (patch)
tree4f87ff9e3aa129bdd3423f78d44aed8a2f9bb1e6 /src/or/hs_common.c
parentf106af3c41dffdc8576c52399a61d34116b78f38 (diff)
downloadtor-5ca9b830eacf46acde56469e5f19f977e5f02668.tar.gz
tor-5ca9b830eacf46acde56469e5f19f977e5f02668.zip
Improve documentation all around the codebase.
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r--src/or/hs_common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index d68c446fd0..570c1132c3 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -669,7 +669,8 @@ hs_parse_address_impl(const char *address, ed25519_public_key_t *key_out,
}
/* Using the given identity public key and a blinded public key, compute the
- * subcredential and put it in subcred_out. This can't fail. */
+ * subcredential and put it in subcred_out (must be of size DIGEST256_LEN).
+ * This can't fail. */
void
hs_get_subcredential(const ed25519_public_key_t *identity_pk,
const ed25519_public_key_t *blinded_pk,
@@ -707,9 +708,9 @@ hs_get_subcredential(const ed25519_public_key_t *identity_pk,
memwipe(credential, 0, sizeof(credential));
}
-/* From the given list of hidden service ports, find the matching one from the
- * given edge connection conn and set the connection address from the service
- * port object. Return 0 on success or -1 if none. */
+/* From the given list of hidden service ports, find the ones that much the
+ * given edge connection conn, pick one at random and use it to set the
+ * connection address. Return 0 on success or -1 if none. */
int
hs_set_conn_addr_port(const smartlist_t *ports, edge_connection_t *conn)
{