mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Address issues identified by external review:
* RIPD-1617, RIPD-1619, RIPD-1621:
Verify serialized public keys more strictly before
using them.
* RIPD-1618:
* Simplify the base58 decoder logic.
* Reduce the complexity of the base58 encoder and
eliminate a potential out-of-bounds memory access.
* Improve type safety by using an `enum class` to
enforce strict type checking for token types.
* RIPD-1616:
Avoid calling `memcpy` with a null pointer even if the
size is specified as zero, since it results in undefined
behavior.
Acknowledgements:
Ripple thanks Guido Vranken for responsibly disclosing these
issues.
Bug Bounties and Responsible Disclosures:
We welcome reviews of the rippled code and urge researchers
to responsibly disclose any issues that they may find. For
more on Ripple's Bug Bounty program, please visit:
https://ripple.com/bug-bounty
This commit is contained in:
@@ -231,12 +231,12 @@ public:
|
||||
void testBase58 (KeyType keyType)
|
||||
{
|
||||
// Try converting short, long and malformed data
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, ""));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, " "));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, "!ty89234gh45"));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, ""));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, " "));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, "!ty89234gh45"));
|
||||
|
||||
auto const good = toBase58 (
|
||||
TokenType::TOKEN_NODE_PUBLIC,
|
||||
TokenType::NodePublic,
|
||||
derivePublicKey (
|
||||
keyType,
|
||||
randomSecretKey()));
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
while (!s.empty())
|
||||
{
|
||||
s.erase (r(s) % s.size(), 1);
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, s));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
{
|
||||
auto s = good;
|
||||
s.resize (s.size() + i, s[i % s.size()]);
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, s));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, s));
|
||||
}
|
||||
|
||||
// Strings with invalid Base58 characters
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
{
|
||||
auto s = good;
|
||||
s[i % s.size()] = c;
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, s));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
for (auto c : std::string("apsrJqtv7"))
|
||||
{
|
||||
s[0] = c;
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TOKEN_NODE_PUBLIC, s));
|
||||
BEAST_EXPECT(!parseBase58<PublicKey> (TokenType::NodePublic, s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,12 +294,12 @@ public:
|
||||
for (std::size_t i = 0; i != keys.size(); ++i)
|
||||
{
|
||||
auto const si = toBase58 (
|
||||
TokenType::TOKEN_NODE_PUBLIC,
|
||||
TokenType::NodePublic,
|
||||
keys[i]);
|
||||
BEAST_EXPECT(!si.empty());
|
||||
|
||||
auto const ski = parseBase58<PublicKey> (
|
||||
TOKEN_NODE_PUBLIC, si);
|
||||
TokenType::NodePublic, si);
|
||||
BEAST_EXPECT(ski && (keys[i] == *ski));
|
||||
|
||||
for (std::size_t j = i; j != keys.size(); ++j)
|
||||
@@ -307,13 +307,13 @@ public:
|
||||
BEAST_EXPECT((keys[i] == keys[j]) == (i == j));
|
||||
|
||||
auto const sj = toBase58 (
|
||||
TokenType::TOKEN_NODE_PUBLIC,
|
||||
TokenType::NodePublic,
|
||||
keys[j]);
|
||||
|
||||
BEAST_EXPECT((si == sj) == (i == j));
|
||||
|
||||
auto const skj = parseBase58<PublicKey> (
|
||||
TOKEN_NODE_PUBLIC, sj);
|
||||
TokenType::NodePublic, sj);
|
||||
BEAST_EXPECT(skj && (keys[j] == *skj));
|
||||
|
||||
BEAST_EXPECT((*ski == *skj) == (i == j));
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
generateSeed ("masterpassphrase")));
|
||||
|
||||
auto const pk2 = parseBase58<PublicKey> (
|
||||
TOKEN_NODE_PUBLIC,
|
||||
TokenType::NodePublic,
|
||||
"n94a1u4jAz288pZLtw6yFWVbi89YamiC6JBXPVUj5zmExe5fTVg9");
|
||||
BEAST_EXPECT(pk2);
|
||||
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
generateSeed ("masterpassphrase")));
|
||||
|
||||
auto const pk2 = parseBase58<PublicKey> (
|
||||
TOKEN_NODE_PUBLIC,
|
||||
TokenType::NodePublic,
|
||||
"nHUeeJCSY2dM71oxM8Cgjouf5ekTuev2mwDpc374aLMxzDLXNmjf");
|
||||
BEAST_EXPECT(pk2);
|
||||
|
||||
|
||||
111
src/test/protocol/STValidation_test.cpp
Normal file
111
src/test/protocol/STValidation_test.cpp
Normal file
@@ -0,0 +1,111 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of rippled: https://github.com/ripple/rippled
|
||||
Copyright (c) 2012, 2013 Ripple Labs Inc.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/protocol/SecretKey.h>
|
||||
#include <ripple/protocol/st.h>
|
||||
#include <ripple/json/json_reader.h>
|
||||
#include <ripple/json/to_string.h>
|
||||
#include <ripple/beast/unit_test.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
class STValidation_test : public beast::unit_test::suite
|
||||
{
|
||||
public:
|
||||
void testDeserialization ()
|
||||
{
|
||||
testcase ("Deserialization");
|
||||
|
||||
constexpr unsigned char payload1[] =
|
||||
{ // specifies an Ed25519 public key
|
||||
0x72, 0x00, 0x73, 0x21, 0xed, 0x78, 0x00, 0xe6, 0x73, 0x00, 0x72, 0x00, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x88, 0x00, 0xe6, 0x73, 0x38, 0x00, 0x00, 0x8a, 0x00, 0x88, 0x4e, 0x31, 0x30, 0x5f, 0x5f, 0x63,
|
||||
0x78, 0x78, 0x61, 0x62, 0x69, 0x76, 0x31, 0x30, 0x37, 0x5f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73,
|
||||
0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x45, 0x00, 0xe6, 0x88, 0x54, 0x72,
|
||||
0x75, 0x73, 0x74, 0x53, 0x65, 0x74, 0x65, 0x61, 0x74, 0x65, 0x88, 0x00, 0xe6, 0x88, 0x00, 0xe6,
|
||||
0x73, 0x00, 0x72, 0x00, 0x8a, 0x00, 0x88, 0x00, 0xe6
|
||||
};
|
||||
|
||||
constexpr unsigned char payload2[] =
|
||||
{
|
||||
0x73, 0x21, 0xed, 0xff, 0x03, 0x1c, 0xbe, 0x65, 0x22, 0x61, 0x9c, 0x5e, 0x13, 0x12, 0x00, 0x3b,
|
||||
0x43, 0x00, 0x00, 0x00, 0xf7, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x13, 0x13, 0x13,
|
||||
0x3a, 0x27, 0xff
|
||||
};
|
||||
|
||||
constexpr unsigned char payload3[] =
|
||||
{ // Has no public key at all
|
||||
0x72, 0x00, 0x76, 0x31, 0x30, 0x37, 0x5f, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x74, 0x79,
|
||||
0x70, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x45, 0x00, 0xe6, 0x88, 0x54, 0x72, 0x75, 0x73, 0x74,
|
||||
0x53, 0x65, 0x74, 0x65, 0x61, 0x74, 0x65, 0x88, 0x00, 0xe6, 0x88, 0x00, 0xe6, 0x73, 0x00, 0x72,
|
||||
0x00, 0x8a, 0x00, 0x88, 0x00, 0xe6
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
SerialIter sit{payload1, sizeof(payload1)};
|
||||
auto stx = std::make_shared<ripple::STValidation>(sit);
|
||||
fail("An exception should have been thrown");
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
BEAST_EXPECT(strcmp(e.what(), "Invalid public key in validation") == 0);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
SerialIter sit{payload2, sizeof(payload2)};
|
||||
auto stx = std::make_shared<ripple::STValidation>(sit);
|
||||
fail("An exception should have been thrown");
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
BEAST_EXPECT(strcmp(e.what(), "Invalid public key in validation") == 0);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
SerialIter sit{payload3, sizeof(payload3)};
|
||||
auto stx = std::make_shared<ripple::STValidation>(sit);
|
||||
fail("An exception should have been thrown");
|
||||
}
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
log << e.what() << "\n";
|
||||
BEAST_EXPECT(strcmp(e.what(), "Invalid public key in validation") == 0);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
run()
|
||||
{
|
||||
testDeserialization();
|
||||
}
|
||||
};
|
||||
|
||||
BEAST_DEFINE_TESTSUITE(STValidation,protocol,ripple);
|
||||
|
||||
} // ripple
|
||||
@@ -320,7 +320,7 @@ public:
|
||||
generateSeed ("masterpassphrase"));
|
||||
|
||||
auto const sk2 = parseBase58<SecretKey> (
|
||||
TOKEN_NODE_PRIVATE,
|
||||
TokenType::NodePrivate,
|
||||
"pnen77YEeUd4fFKG7iycBWcwKpTaeFRkW2WFostaATy1DSupwXe");
|
||||
BEAST_EXPECT(sk2);
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
generateSeed ("masterpassphrase"));
|
||||
|
||||
auto const sk2 = parseBase58<SecretKey> (
|
||||
TOKEN_NODE_PRIVATE,
|
||||
TokenType::NodePrivate,
|
||||
"paKv46LztLqK3GaKz1rG2nQGN6M4JLyRtxFBYFTw4wAVHtGys36");
|
||||
BEAST_EXPECT(sk2);
|
||||
|
||||
@@ -341,12 +341,12 @@ public:
|
||||
}
|
||||
|
||||
// Try converting short, long and malformed data
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, ""));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, " "));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, "!35gty9mhju8nfjl"));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, ""));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, " "));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, "!35gty9mhju8nfjl"));
|
||||
|
||||
auto const good = toBase58 (
|
||||
TokenType::TOKEN_NODE_PRIVATE,
|
||||
TokenType::NodePrivate,
|
||||
randomSecretKey());
|
||||
|
||||
// Short (non-empty) strings
|
||||
@@ -359,7 +359,7 @@ public:
|
||||
while (!s.empty())
|
||||
{
|
||||
s.erase (r(s) % s.size(), 1);
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, s));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
{
|
||||
auto s = good;
|
||||
s.resize (s.size() + i, s[i % s.size()]);
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, s));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
|
||||
}
|
||||
|
||||
// Strings with invalid Base58 characters
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
{
|
||||
auto s = good;
|
||||
s[i % s.size()] = c;
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, s));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ public:
|
||||
for (auto c : std::string("ansrJqtv7"))
|
||||
{
|
||||
s[0] = c;
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TOKEN_NODE_PRIVATE, s));
|
||||
BEAST_EXPECT(!parseBase58<SecretKey> (TokenType::NodePrivate, s));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,12 +402,12 @@ public:
|
||||
for (std::size_t i = 0; i != keys.size(); ++i)
|
||||
{
|
||||
auto const si = toBase58 (
|
||||
TokenType::TOKEN_NODE_PRIVATE,
|
||||
TokenType::NodePrivate,
|
||||
keys[i]);
|
||||
BEAST_EXPECT(!si.empty());
|
||||
|
||||
auto const ski = parseBase58<SecretKey> (
|
||||
TOKEN_NODE_PRIVATE, si);
|
||||
TokenType::NodePrivate, si);
|
||||
BEAST_EXPECT(ski && keys[i] == *ski);
|
||||
|
||||
for (std::size_t j = i; j != keys.size(); ++j)
|
||||
@@ -415,13 +415,13 @@ public:
|
||||
BEAST_EXPECT((keys[i] == keys[j]) == (i == j));
|
||||
|
||||
auto const sj = toBase58 (
|
||||
TokenType::TOKEN_NODE_PRIVATE,
|
||||
TokenType::NodePrivate,
|
||||
keys[j]);
|
||||
|
||||
BEAST_EXPECT((si == sj) == (i == j));
|
||||
|
||||
auto const skj = parseBase58<SecretKey> (
|
||||
TOKEN_NODE_PRIVATE, sj);
|
||||
TokenType::NodePrivate, sj);
|
||||
BEAST_EXPECT(skj && keys[j] == *skj);
|
||||
|
||||
BEAST_EXPECT((*ski == *skj) == (i == j));
|
||||
|
||||
@@ -136,9 +136,9 @@ public:
|
||||
auto const publicKey = derivePublicKey (
|
||||
KeyType::secp256k1, secretKey);
|
||||
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_NODE_PUBLIC, publicKey) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::NodePublic, publicKey) ==
|
||||
"n94a1u4jAz288pZLtw6yFWVbi89YamiC6JBXPVUj5zmExe5fTVg9");
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_NODE_PRIVATE, secretKey) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::NodePrivate, secretKey) ==
|
||||
"pnen77YEeUd4fFKG7iycBWcwKpTaeFRkW2WFostaATy1DSupwXe");
|
||||
BEAST_EXPECT(to_string(calcNodeID(publicKey)) ==
|
||||
"7E59C17D50F5959C7B158FEC95C8F815BF653DC8");
|
||||
@@ -179,9 +179,9 @@ public:
|
||||
auto const publicKey = derivePublicKey (
|
||||
KeyType::ed25519, secretKey);
|
||||
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_NODE_PUBLIC, publicKey) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::NodePublic, publicKey) ==
|
||||
"nHUeeJCSY2dM71oxM8Cgjouf5ekTuev2mwDpc374aLMxzDLXNmjf");
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_NODE_PRIVATE, secretKey) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::NodePrivate, secretKey) ==
|
||||
"paKv46LztLqK3GaKz1rG2nQGN6M4JLyRtxFBYFTw4wAVHtGys36");
|
||||
BEAST_EXPECT(to_string(calcNodeID(publicKey)) ==
|
||||
"AA066C988C712815CC37AF71472B7CBBBD4E2A0A");
|
||||
@@ -223,9 +223,9 @@ public:
|
||||
|
||||
BEAST_EXPECT(toBase58(calcAccountID(keyPair.first)) ==
|
||||
"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh");
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_ACCOUNT_PUBLIC, keyPair.first) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::AccountPublic, keyPair.first) ==
|
||||
"aBQG8RQAzjs1eTKFEAQXr2gS4utcDiEC9wmi7pfUPTi27VCahwgw");
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_ACCOUNT_SECRET, keyPair.second) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::AccountSecret, keyPair.second) ==
|
||||
"p9JfM6HHi64m6mvB6v5k7G2b1cXzGmYiCNJf6GHPKvFTWdeRVjh");
|
||||
|
||||
auto sig = sign (keyPair.first, keyPair.second, makeSlice(message1));
|
||||
@@ -263,9 +263,9 @@ public:
|
||||
|
||||
BEAST_EXPECT(to_string(calcAccountID(keyPair.first)) ==
|
||||
"rGWrZyQqhTp9Xu7G5Pkayo7bXjH4k4QYpf");
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_ACCOUNT_PUBLIC, keyPair.first) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::AccountPublic, keyPair.first) ==
|
||||
"aKGheSBjmCsKJVuLNKRAKpZXT6wpk2FCuEZAXJupXgdAxX5THCqR");
|
||||
BEAST_EXPECT(toBase58(TokenType::TOKEN_ACCOUNT_SECRET, keyPair.second) ==
|
||||
BEAST_EXPECT(toBase58(TokenType::AccountSecret, keyPair.second) ==
|
||||
"pwDQjwEhbUBmPuEjFpEG75bFhv2obkCB7NxQsfFxM7xGHBMVPu9");
|
||||
|
||||
auto sig = sign (keyPair.first, keyPair.second, makeSlice(message1));
|
||||
@@ -305,16 +305,16 @@ public:
|
||||
auto const node1 = randomKeyPair(KeyType::secp256k1);
|
||||
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58 (TokenType::TOKEN_NODE_PUBLIC, node1.first)));
|
||||
toBase58 (TokenType::NodePublic, node1.first)));
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58 (TokenType::TOKEN_NODE_PRIVATE, node1.second)));
|
||||
toBase58 (TokenType::NodePrivate, node1.second)));
|
||||
|
||||
auto const node2 = randomKeyPair(KeyType::ed25519);
|
||||
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58 (TokenType::TOKEN_NODE_PUBLIC, node2.first)));
|
||||
toBase58 (TokenType::NodePublic, node2.first)));
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58 (TokenType::TOKEN_NODE_PRIVATE, node2.second)));
|
||||
toBase58 (TokenType::NodePrivate, node2.second)));
|
||||
|
||||
auto const account1 = generateKeyPair(
|
||||
KeyType::secp256k1, randomSeed ());
|
||||
@@ -322,9 +322,9 @@ public:
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58(calcAccountID(account1.first))));
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58(TokenType::TOKEN_ACCOUNT_PUBLIC, account1.first)));
|
||||
toBase58(TokenType::AccountPublic, account1.first)));
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58(TokenType::TOKEN_ACCOUNT_SECRET, account1.second)));
|
||||
toBase58(TokenType::AccountSecret, account1.second)));
|
||||
|
||||
auto const account2 = generateKeyPair(
|
||||
KeyType::ed25519, randomSeed ());
|
||||
@@ -332,9 +332,9 @@ public:
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58(calcAccountID(account2.first))));
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58(TokenType::TOKEN_ACCOUNT_PUBLIC, account2.first)));
|
||||
toBase58(TokenType::AccountPublic, account2.first)));
|
||||
BEAST_EXPECT(!parseGenericSeed (
|
||||
toBase58(TokenType::TOKEN_ACCOUNT_SECRET, account2.second)));
|
||||
toBase58(TokenType::AccountSecret, account2.second)));
|
||||
}
|
||||
|
||||
void run() override
|
||||
|
||||
Reference in New Issue
Block a user