mirror of
https://github.com/monero-project/monero.git
synced 2026-01-13 13:27:34 -08:00
trezor: adapt to new passphrase mechanism
- choice where to enter passphrase is now made on the host - use wipeable string in the comm stack - wipe passphrase memory - protocol optimizations, prepare for new firmware version - minor fixes and improvements - tests fixes, HF12 support
This commit is contained in:
@@ -267,13 +267,15 @@ struct Wallet2CallbackImpl : public tools::i_wallet2_callback
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
virtual boost::optional<epee::wipeable_string> on_device_passphrase_request(bool on_device)
|
||||
virtual boost::optional<epee::wipeable_string> on_device_passphrase_request(bool & on_device)
|
||||
{
|
||||
if (m_listener) {
|
||||
auto passphrase = m_listener->onDevicePassphraseRequest(on_device);
|
||||
if (!on_device && passphrase) {
|
||||
if (passphrase) {
|
||||
return boost::make_optional(epee::wipeable_string((*passphrase).data(), (*passphrase).size()));
|
||||
}
|
||||
} else {
|
||||
on_device = true;
|
||||
}
|
||||
return boost::none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user