new wipeable_string class to replace std::string passphrases

This commit is contained in:
moneromooo-monero 2017-11-25 14:50:15 +00:00
parent 7a2a574118
commit 3dffe71b72
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
15 changed files with 293 additions and 68 deletions

View file

@ -206,7 +206,8 @@ namespace tools
}
std::fputs(http_login->username.c_str(), rpc_login_file.handle());
std::fputc(':', rpc_login_file.handle());
std::fputs(http_login->password.c_str(), rpc_login_file.handle());
const epee::wipeable_string password = http_login->password;
std::fwrite(password.data(), 1, password.size(), rpc_login_file.handle());
std::fflush(rpc_login_file.handle());
if (std::ferror(rpc_login_file.handle()))
{