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/tools | |
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/tools')
-rw-r--r-- | src/tools/tor-gencert.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/tor-gencert.c b/src/tools/tor-gencert.c index 5ae155609a..c0cab7efe7 100644 --- a/src/tools/tor-gencert.c +++ b/src/tools/tor-gencert.c @@ -486,7 +486,8 @@ generate_certificate(void) EVP_PKEY_get1_RSA(signing_key), RSA_PKCS1_PADDING); signed_len = strlen(buf); - base64_encode(buf+signed_len, sizeof(buf)-signed_len, signature, r); + base64_encode(buf+signed_len, sizeof(buf)-signed_len, signature, r, + BASE64_ENCODE_MULTILINE); strlcat(buf, "-----END ID SIGNATURE-----\n" @@ -501,7 +502,8 @@ generate_certificate(void) RSA_PKCS1_PADDING); strlcat(buf, "-----BEGIN SIGNATURE-----\n", sizeof(buf)); signed_len = strlen(buf); - base64_encode(buf+signed_len, sizeof(buf)-signed_len, signature, r); + base64_encode(buf+signed_len, sizeof(buf)-signed_len, signature, r, + BASE64_ENCODE_MULTILINE); strlcat(buf, "-----END SIGNATURE-----\n", sizeof(buf)); if (!(f = fopen(certificate_file, "w"))) { |