aboutsummaryrefslogtreecommitdiff
path: root/src/device_trezor/device_trezor_base.hpp
diff options
context:
space:
mode:
authorDusan Klinec <dusan.klinec@gmail.com>2020-04-07 18:25:25 +0200
committerDusan Klinec <dusan.klinec@gmail.com>2020-04-27 18:17:56 +0200
commite509ede2aa7263cc49d3378bc8c833a62300211d (patch)
treedf49ba98d2d90e024c638adc13b3556dabaa7ce3 /src/device_trezor/device_trezor_base.hpp
parentMerge pull request #6405 (diff)
downloadmonero-e509ede2aa7263cc49d3378bc8c833a62300211d.tar.xz
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
Diffstat (limited to 'src/device_trezor/device_trezor_base.hpp')
-rw-r--r--src/device_trezor/device_trezor_base.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device_trezor/device_trezor_base.hpp b/src/device_trezor/device_trezor_base.hpp
index c106d2099..62b2c2bf4 100644
--- a/src/device_trezor/device_trezor_base.hpp
+++ b/src/device_trezor/device_trezor_base.hpp
@@ -70,7 +70,7 @@ namespace trezor {
void on_button_request(uint64_t code=0) override;
boost::optional<epee::wipeable_string> on_pin_request() override;
- boost::optional<epee::wipeable_string> on_passphrase_request(bool on_device) override;
+ boost::optional<epee::wipeable_string> on_passphrase_request(bool & on_device) override;
void on_passphrase_state_request(const std::string &state);
void on_disconnect();
protected:
@@ -94,7 +94,7 @@ namespace trezor {
std::string m_full_name;
std::vector<unsigned int> m_wallet_deriv_path;
- std::string m_device_state; // returned after passphrase entry, session
+ epee::wipeable_string m_device_session_id; // returned after passphrase entry, session
std::shared_ptr<messages::management::Features> m_features; // features from the last device reset
boost::optional<epee::wipeable_string> m_pin;
boost::optional<epee::wipeable_string> m_passphrase;
@@ -117,7 +117,7 @@ namespace trezor {
void require_initialized() const;
void call_ping_unsafe();
void test_ping();
- virtual void device_state_reset_unsafe();
+ virtual void device_state_initialize_unsafe();
void ensure_derivation_path() noexcept;
// Communication methods
@@ -315,7 +315,7 @@ namespace trezor {
void on_button_pressed();
void on_pin_request(GenericMessage & resp, const messages::common::PinMatrixRequest * msg);
void on_passphrase_request(GenericMessage & resp, const messages::common::PassphraseRequest * msg);
- void on_passphrase_state_request(GenericMessage & resp, const messages::common::PassphraseStateRequest * msg);
+ void on_passphrase_state_request(GenericMessage & resp, const messages::common::Deprecated_PassphraseStateRequest * msg);
#ifdef WITH_TREZOR_DEBUGGING
void set_debug(bool debug){