aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-07 00:03:15 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-08-16 09:17:52 +0000
commitea37614efe518ff8f363ddf2465301687e04d977 (patch)
tree17a975260d2943c18f3a19c51bb6bc88dd26b98c /src/wallet/wallet_rpc_server.cpp
parentMerge pull request #4191 (diff)
downloadmonero-ea37614efe518ff8f363ddf2465301687e04d977.tar.xz
wallet: wipe seed from memory where appropriate
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet_rpc_server.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 510cb3e58..136cd0e2d 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -1574,11 +1574,13 @@ namespace tools
if (req.key_type.compare("mnemonic") == 0)
{
- if (!m_wallet->get_seed(res.key))
+ epee::wipeable_string seed;
+ if (!m_wallet->get_seed(seed))
{
er.message = "The wallet is non-deterministic. Cannot display seed.";
return false;
}
+ res.key = std::string(seed.data(), seed.size()); // send to the network, then wipe RAM :D
}
else if(req.key_type.compare("view_key") == 0)
{