aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobtoht <thotbot@protonmail.com>2021-06-04 17:41:42 +0200
committertobtoht <thotbot@protonmail.com>2021-06-04 17:41:42 +0200
commitd52d21bd46e17e1811d13e35df2e5a779b827fb2 (patch)
tree52b9274c8aa8dde2cdc7daaa0c9e654f7977ab25
parentMerge pull request #7735 (diff)
downloadmonero-d52d21bd46e17e1811d13e35df2e5a779b827fb2.tar.xz
ledger: don't lock for software device
-rw-r--r--src/device/device_ledger.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/device/device_ledger.cpp b/src/device/device_ledger.cpp
index 384b776ee..26a0d8da5 100644
--- a/src/device/device_ledger.cpp
+++ b/src/device/device_ledger.cpp
@@ -686,7 +686,6 @@ namespace hw {
/* ======================================================================= */
bool device_ledger::derive_subaddress_public_key(const crypto::public_key &pub, const crypto::key_derivation &derivation, const std::size_t output_index, crypto::public_key &derived_pub){
- AUTO_LOCK_CMD();
#ifdef DEBUG_HWDEVICE
const crypto::public_key pub_x = pub;
crypto::key_derivation derivation_x;
@@ -710,7 +709,7 @@ namespace hw {
MDEBUG( "derive_subaddress_public_key : PARSE mode with known viewkey");
crypto::derive_subaddress_public_key(pub, derivation, output_index,derived_pub);
} else {
-
+ AUTO_LOCK_CMD();
int offset = set_command_header_noopt(INS_DERIVE_SUBADDRESS_PUBLIC_KEY);
//pub
memmove(this->buffer_send+offset, pub.data, 32);
@@ -1038,7 +1037,6 @@ namespace hw {
}
bool device_ledger::generate_key_derivation(const crypto::public_key &pub, const crypto::secret_key &sec, crypto::key_derivation &derivation) {
- AUTO_LOCK_CMD();
bool r = false;
#ifdef DEBUG_HWDEVICE
@@ -1059,6 +1057,7 @@ namespace hw {
assert(is_fake_view_key(sec));
r = crypto::generate_key_derivation(pub, this->viewkey, derivation);
} else {
+ AUTO_LOCK_CMD();
int offset = set_command_header_noopt(INS_GEN_KEY_DERIVATION);
//pub
memmove(this->buffer_send+offset, pub.data, 32);