util: io::load accepts base64 encoding without newlines
This commit also renames io::BASE_64 to io::BASE64.
refs #3741
Change-Id: I46286c72d12e685902a72ce8dab4a1385dc0fceb
diff --git a/tests/unit-tests/security/dummy-keychain.cpp b/tests/unit-tests/security/dummy-keychain.cpp
index 947bebf..c173117 100644
--- a/tests/unit-tests/security/dummy-keychain.cpp
+++ b/tests/unit-tests/security/dummy-keychain.cpp
@@ -114,9 +114,8 @@
{
static shared_ptr<v1::PublicKey> publicKey = nullptr;
if (publicKey == nullptr) {
- typedef boost::iostreams::stream<boost::iostreams::array_source> arrayStream;
- arrayStream
- is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
+ typedef boost::iostreams::stream<boost::iostreams::array_source> ArrayStream;
+ ArrayStream is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
auto cert = io::load<v1::IdentityCertificate>(is, io::NO_ENCODING);
publicKey = make_shared<v1::PublicKey>(cert->getPublicKeyInfo());
}
@@ -146,10 +145,9 @@
{
static shared_ptr<v1::IdentityCertificate> cert = nullptr;
if (cert == nullptr) {
- typedef boost::iostreams::stream<boost::iostreams::array_source> arrayStream;
- arrayStream
- is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
- cert = io::load<v1::IdentityCertificate>(is, io::BASE_64);
+ typedef boost::iostreams::stream<boost::iostreams::array_source> ArrayStream;
+ ArrayStream is(reinterpret_cast<const char*>(DUMMY_CERT), sizeof(DUMMY_CERT));
+ cert = io::load<v1::IdentityCertificate>(is);
}
return cert;