summaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-19 12:33:04 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-09-19 12:33:04 -0400
commit5dea4b565f7295bae8c48790cc7d00a6e237fff0 (patch)
treebdf04e8518f881b3dcb2ddcd51166b59897207dd /src/or/hs_common.c
parentf395f41868514a0e418c95f3203d59f3aca6fa47 (diff)
downloadtor-5dea4b565f7295bae8c48790cc7d00a6e237fff0.tar.gz
tor-5dea4b565f7295bae8c48790cc7d00a6e237fff0.zip
Add a BASE32_DIGEST_LEN define
Use this value instead of hardcoded values of 32 everywhere. This also addresses the use of REND_DESC_ID_V2_LEN_BASE32 in hs_lookup_last_hid_serv_request() for the HSDir encoded identity digest length which is accurate but semantically wrong. Fixes #23305. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r--src/or/hs_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index 2cdfe57cd6..42c15c80d3 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -1453,7 +1453,7 @@ hs_lookup_last_hid_serv_request(routerstatus_t *hs_dir,
const char *req_key_str,
time_t now, int set)
{
- char hsdir_id_base32[REND_DESC_ID_V2_LEN_BASE32 + 1];
+ char hsdir_id_base32[BASE32_DIGEST_LEN + 1];
char *hsdir_desc_comb_id = NULL;
time_t *last_request_ptr;
strmap_t *last_hid_serv_requests = get_last_hid_serv_requests();