diff options
author | Yawning Angel <yawning@schwanenlied.me> | 2015-04-10 11:25:08 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-04-23 09:06:58 -0400 |
commit | 196499da73afa5c8000154aafe36c10b9ee43901 (patch) | |
tree | fb6343334ed05db14dbe3e8a14a2e18ee1534d08 /src/or/dirvote.c | |
parent | ba2485f7df51b2daafaff8567320c34a22731e8e (diff) | |
download | tor-196499da73afa5c8000154aafe36c10b9ee43901.tar.gz tor-196499da73afa5c8000154aafe36c10b9ee43901.zip |
Use a custom Base64 encoder with more control over the output format.
Diffstat (limited to 'src/or/dirvote.c')
-rw-r--r-- | src/or/dirvote.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 7a5154dae5..3009026ee7 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -2244,7 +2244,8 @@ networkstatus_format_signatures(networkstatus_t *consensus, for_detached_signatures ? flavor_name : "", digest_name, id, sk); } - base64_encode(buf, sizeof(buf), sig->signature, sig->signature_len); + base64_encode(buf, sizeof(buf), sig->signature, sig->signature_len, + BASE64_ENCODE_MULTILINE); strlcat(buf, "-----END SIGNATURE-----\n", sizeof(buf)); smartlist_add(elements, tor_strdup(buf)); } SMARTLIST_FOREACH_END(sig); @@ -3459,7 +3460,7 @@ dirvote_create_microdescriptor(const routerinfo_t *ri, int consensus_method) char kbuf[128]; base64_encode(kbuf, sizeof(kbuf), (const char*)ri->onion_curve25519_pkey->public_key, - CURVE25519_PUBKEY_LEN); + CURVE25519_PUBKEY_LEN, BASE64_ENCODE_MULTILINE); smartlist_add_asprintf(chunks, "ntor-onion-key %s", kbuf); } |