summaryrefslogtreecommitdiff
path: root/src/or/hs_cache.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-09-12 09:43:34 -0400
committerDavid Goulet <dgoulet@torproject.org>2017-09-12 11:03:13 -0400
commit184bd2258673f9e33e43cfc1264da78f74ad78a4 (patch)
tree687e4bfa8c5c31c81817417aeb4986832cb589b0 /src/or/hs_cache.c
parent26d462c1f0d4dd7ebd7f3f24c49a26e62e279b93 (diff)
downloadtor-184bd2258673f9e33e43cfc1264da78f74ad78a4.tar.gz
tor-184bd2258673f9e33e43cfc1264da78f74ad78a4.zip
hs: Fix digest256 to base64 issue in a log statement
Part of #23480. Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_cache.c')
-rw-r--r--src/or/hs_cache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/hs_cache.c b/src/or/hs_cache.c
index 78e2adacf6..7f2a9cbbb7 100644
--- a/src/or/hs_cache.c
+++ b/src/or/hs_cache.c
@@ -234,8 +234,7 @@ cache_clean_v3_as_dir(time_t now, time_t global_cutoff)
/* Logging. */
{
char key_b64[BASE64_DIGEST256_LEN + 1];
- base64_encode(key_b64, sizeof(key_b64), (const char *) key,
- DIGEST256_LEN, 0);
+ digest256_to_base64(key_b64, (const char *) key);
log_info(LD_REND, "Removing v3 descriptor '%s' from HSDir cache",
safe_str_client(key_b64));
}
@@ -655,8 +654,7 @@ cache_clean_v3_as_client(time_t now)
/* Logging. */
{
char key_b64[BASE64_DIGEST256_LEN + 1];
- base64_encode(key_b64, sizeof(key_b64), (const char *) key,
- DIGEST256_LEN, 0);
+ digest256_to_base64(key_b64, (const char *) key);
log_info(LD_REND, "Removing hidden service v3 descriptor '%s' "
"from client cache",
safe_str_client(key_b64));