Check for invalid private keys in wallet_decrypt_unsafe (#1128)
This commit is contained in:
parent
e554104cb9
commit
f94707eb8c
1 changed files with 4 additions and 0 deletions
|
@ -453,6 +453,10 @@ std::error_code rai::handle_node_options (boost::program_options::variables_map
|
|||
auto error (existing->second->store.fetch (transaction, account, key));
|
||||
assert (!error);
|
||||
std::cout << boost::str (boost::format ("Pub: %1% Prv: %2%\n") % account.to_account () % key.data.to_string ());
|
||||
if (rai::pub_key (key.data) != account)
|
||||
{
|
||||
std::cerr << boost::str (boost::format ("Invalid private key %1%\n") % key.data.to_string ());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue