aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2010-07-26 17:41:47 +0000
committerGavin Andresen <gavinandresen@gmail.com>2010-07-26 17:41:47 +0000
commitf0c11b1917009f1648eb42f1d17f35196fb7c539 (patch)
tree78db43fc3a70a4e1c1856c1d25654a9c7318a9a6
parent40cd0369419323f8d7385950e20342e998c994e1 (diff)
downloadbitcoin-f0c11b1917009f1648eb42f1d17f35196fb7c539.tar.xz
Gavin: BIO_FLAGS_BASE64_NO_NL
-rw-r--r--rpc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/rpc.cpp b/rpc.cpp
index 5c3e64a430..5c0674fd08 100644
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -765,13 +765,14 @@ string EncodeBase64(string s)
BUF_MEM *bptr;
b64 = BIO_new(BIO_f_base64());
+ BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
bmem = BIO_new(BIO_s_mem());
b64 = BIO_push(b64, bmem);
BIO_write(b64, s.c_str(), s.size());
BIO_flush(b64);
BIO_get_mem_ptr(b64, &bptr);
- string result(bptr->data, bptr->length-1);
+ string result(bptr->data, bptr->length);
BIO_free_all(b64);
return result;