mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Do not use beast base64 encoding without fix:
Boost 1.67 and 1.68 are missing this fix
0439dcfa7a
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <boost/beast/core/detail/base64.hpp>
|
||||
#include <ripple/app/misc/ValidatorList.h>
|
||||
#include <ripple/basics/base64.h>
|
||||
#include <ripple/basics/Slice.h>
|
||||
#include <ripple/basics/strHex.h>
|
||||
#include <ripple/app/misc/ValidatorList.h>
|
||||
#include <test/jtx.h>
|
||||
#include <ripple/protocol/digest.h>
|
||||
#include <ripple/protocol/HashPrefix.h>
|
||||
@@ -89,7 +89,7 @@ private:
|
||||
derivePublicKey(KeyType::ed25519, secret);
|
||||
auto const signingKeys = randomKeyPair(KeyType::secp256k1);
|
||||
return { masterPublic, signingKeys.first,
|
||||
boost::beast::detail::base64_encode(makeManifestString (
|
||||
base64_encode(makeManifestString (
|
||||
masterPublic, secret, signingKeys.first, signingKeys.second, 1)) };
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ private:
|
||||
|
||||
data.pop_back();
|
||||
data += "]}";
|
||||
return boost::beast::detail::base64_encode(data);
|
||||
return base64_encode(data);
|
||||
}
|
||||
|
||||
std::string
|
||||
@@ -120,7 +120,7 @@ private:
|
||||
std::string const& blob,
|
||||
std::pair<PublicKey, SecretKey> const& keys)
|
||||
{
|
||||
auto const data = boost::beast::detail::base64_decode (blob);
|
||||
auto const data = base64_decode (blob);
|
||||
return strHex(sign(
|
||||
keys.first, keys.second, makeSlice(data)));
|
||||
}
|
||||
@@ -374,7 +374,7 @@ private:
|
||||
auto const publisherPublic =
|
||||
derivePublicKey(KeyType::ed25519, publisherSecret);
|
||||
auto const pubSigningKeys1 = randomKeyPair(KeyType::secp256k1);
|
||||
auto const manifest1 = boost::beast::detail::base64_encode(makeManifestString (
|
||||
auto const manifest1 = base64_encode(makeManifestString (
|
||||
publisherPublic, publisherSecret,
|
||||
pubSigningKeys1.first, pubSigningKeys1.second, 1));
|
||||
|
||||
@@ -426,7 +426,7 @@ private:
|
||||
}
|
||||
|
||||
// do not use list from untrusted publisher
|
||||
auto const untrustedManifest = boost::beast::detail::base64_encode(
|
||||
auto const untrustedManifest = base64_encode(
|
||||
makeManifestString (
|
||||
randomMasterKey(), publisherSecret,
|
||||
pubSigningKeys1.first, pubSigningKeys1.second, 1));
|
||||
@@ -473,7 +473,7 @@ private:
|
||||
|
||||
// apply list with new publisher key updated by manifest
|
||||
auto const pubSigningKeys2 = randomKeyPair(KeyType::secp256k1);
|
||||
auto manifest2 = boost::beast::detail::base64_encode(makeManifestString (
|
||||
auto manifest2 = base64_encode(makeManifestString (
|
||||
publisherPublic, publisherSecret,
|
||||
pubSigningKeys2.first, pubSigningKeys2.second, 2));
|
||||
|
||||
@@ -497,7 +497,7 @@ private:
|
||||
// do not apply list with revoked publisher key
|
||||
// applied list is removed due to revoked publisher key
|
||||
auto const signingKeysMax = randomKeyPair(KeyType::secp256k1);
|
||||
auto maxManifest = boost::beast::detail::base64_encode(makeManifestString (
|
||||
auto maxManifest = base64_encode(makeManifestString (
|
||||
publisherPublic, publisherSecret,
|
||||
pubSigningKeys2.first, pubSigningKeys2.second,
|
||||
std::numeric_limits<std::uint32_t>::max ()));
|
||||
@@ -747,7 +747,7 @@ private:
|
||||
std::vector<std::string> emptyCfgKeys;
|
||||
auto const publisherKeys = randomKeyPair(KeyType::secp256k1);
|
||||
auto const pubSigningKeys = randomKeyPair(KeyType::secp256k1);
|
||||
auto const manifest = boost::beast::detail::base64_encode (
|
||||
auto const manifest = base64_encode (
|
||||
makeManifestString (
|
||||
publisherKeys.first, publisherKeys.second,
|
||||
pubSigningKeys.first, pubSigningKeys.second, 1));
|
||||
@@ -917,7 +917,7 @@ private:
|
||||
auto const publisherPublic =
|
||||
derivePublicKey(KeyType::ed25519, publisherSecret);
|
||||
auto const pubSigningKeys = randomKeyPair(KeyType::secp256k1);
|
||||
auto const manifest = boost::beast::detail::base64_encode(makeManifestString (
|
||||
auto const manifest = base64_encode(makeManifestString (
|
||||
publisherPublic, publisherSecret,
|
||||
pubSigningKeys.first, pubSigningKeys.second, 1));
|
||||
|
||||
@@ -1021,7 +1021,7 @@ private:
|
||||
auto const publisherPublic =
|
||||
derivePublicKey(KeyType::ed25519, publisherSecret);
|
||||
auto const pubSigningKeys = randomKeyPair(KeyType::secp256k1);
|
||||
auto const manifest = boost::beast::detail::base64_encode(makeManifestString (
|
||||
auto const manifest = base64_encode(makeManifestString (
|
||||
publisherPublic, publisherSecret,
|
||||
pubSigningKeys.first, pubSigningKeys.second, 1));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user