aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorSarang Noether <32460187+SarangNoether@users.noreply.github.com>2020-08-28 19:38:00 -0400
committerSarang Noether <32460187+SarangNoether@users.noreply.github.com>2020-08-28 19:38:00 -0400
commitfa06c39d9731b90dfd58ecd6cdfd3c936ee139a7 (patch)
treece191c3d6f23869e1250f7d77d0746cfafa645c1 /src/simplewallet
parentwallet: allow signing a message with spend or view key (diff)
downloadmonero-fa06c39d9731b90dfd58ecd6cdfd3c936ee139a7.tar.xz
Bind signature to full address and signing mode
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index c974313a0..f37d77933 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -223,7 +223,7 @@ namespace
const char* USAGE_GET_TX_NOTE("get_tx_note <txid>");
const char* USAGE_GET_DESCRIPTION("get_description");
const char* USAGE_SET_DESCRIPTION("set_description [free text note]");
- const char* USAGE_SIGN("sign [<account_index>,<address_index>] [--spend|--view|--both] <filename>");
+ const char* USAGE_SIGN("sign [<account_index>,<address_index>] [--spend|--view] <filename>");
const char* USAGE_VERIFY("verify <filename> <address> <signature>");
const char* USAGE_EXPORT_KEY_IMAGES("export_key_images [all] <filename>");
const char* USAGE_IMPORT_KEY_IMAGES("import_key_images <filename>");
@@ -9911,10 +9911,6 @@ bool simple_wallet::sign(const std::vector<std::string> &args)
{
message_signature_type = tools::wallet2::sign_with_view_key;
}
- else if (args[idx] == "--both")
- {
- message_signature_type = tools::wallet2::sign_with_both_keys;
- }
else
{
fail_msg_writer() << tr("Invalid subaddress index format, and not a signature type: ") << args[idx];
@@ -9971,7 +9967,7 @@ bool simple_wallet::verify(const std::vector<std::string> &args)
}
else
{
- success_msg_writer() << tr("Good signature from ") << address_string << (result.old ? " (using old signature algorithm)" : "") << " with " << (result.type == tools::wallet2::sign_with_spend_key ? "spend key" : result.type == tools::wallet2::sign_with_view_key ? "view key" : result.type == tools::wallet2::sign_with_both_keys ? "both spend and view keys" : "unknown key combination (suspicious)");
+ success_msg_writer() << tr("Good signature from ") << address_string << (result.old ? " (using old signature algorithm)" : "") << " with " << (result.type == tools::wallet2::sign_with_spend_key ? "spend key" : result.type == tools::wallet2::sign_with_view_key ? "view key" : "unknown key combination (suspicious)");
}
return true;
}