aboutsummaryrefslogtreecommitdiff
path: root/src/or/rendclient.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-04-23 09:09:33 -0400
committerNick Mathewson <nickm@torproject.org>2015-04-23 09:09:33 -0400
commit3acee6142221839137607c9a9cbf8ca4feea5993 (patch)
treedad6e7660b7b34358221d25a93dc8c2770441fed /src/or/rendclient.c
parent8a951ed15816b028baf30a0606b9a15a39a36601 (diff)
parent55118d90ca927d2cdb2cbd92189113da4dcb2fe7 (diff)
downloadtor-3acee6142221839137607c9a9cbf8ca4feea5993.tar.gz
tor-3acee6142221839137607c9a9cbf8ca4feea5993.zip
Merge branch 'feature15652_squashed'
Diffstat (limited to 'src/or/rendclient.c')
-rw-r--r--src/or/rendclient.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 14f311c1d5..84d0ccef55 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -690,12 +690,13 @@ directory_get_from_hs_dir(const char *desc_id, const rend_data_t *rend_query)
if (rend_query->auth_type != REND_NO_AUTH) {
if (base64_encode(descriptor_cookie_base64,
sizeof(descriptor_cookie_base64),
- rend_query->descriptor_cookie, REND_DESC_COOKIE_LEN)<0) {
+ rend_query->descriptor_cookie, REND_DESC_COOKIE_LEN,
+ 0)<0) {
log_warn(LD_BUG, "Could not base64-encode descriptor cookie.");
return 0;
}
- /* Remove == signs and newline. */
- descriptor_cookie_base64[strlen(descriptor_cookie_base64)-3] = '\0';
+ /* Remove == signs. */
+ descriptor_cookie_base64[strlen(descriptor_cookie_base64)-2] = '\0';
} else {
strlcpy(descriptor_cookie_base64, "(none)",
sizeof(descriptor_cookie_base64));