aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/CMakeLists.txt4
-rw-r--r--src/wallet/api/wallet.cpp3
-rw-r--r--src/wallet/wallet2.cpp4
3 files changed, 8 insertions, 3 deletions
diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt
index 2e7610b64..639080051 100644
--- a/src/wallet/CMakeLists.txt
+++ b/src/wallet/CMakeLists.txt
@@ -108,7 +108,7 @@ if (NOT BUILD_GUI_DEPS)
epee
rpc
cryptonote_core
- crypto
+ cncrypto
common
${Boost_CHRONO_LIBRARY}
${Boost_PROGRAM_OPTIONS_LIBRARY}
@@ -126,7 +126,7 @@ endif()
# build and install libwallet_merged only if we building for GUI
if (BUILD_GUI_DEPS)
- set(libs_to_merge wallet cryptonote_core cryptonote_basic mnemonics common crypto ringct)
+ set(libs_to_merge wallet cryptonote_core cryptonote_basic mnemonics common cncrypto ringct)
foreach(lib ${libs_to_merge})
list(APPEND objlibs $<TARGET_OBJECTS:obj_${lib}>) # matches naming convention in src/CMakeLists.txt
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp
index 611c1819f..1b4300edf 100644
--- a/src/wallet/api/wallet.cpp
+++ b/src/wallet/api/wallet.cpp
@@ -464,7 +464,8 @@ bool WalletImpl::recoverFromKeys(const std::string &path,
{
if (has_spendkey) {
m_wallet->generate(path, "", address, spendkey, viewkey);
- LOG_PRINT_L1("Generated new wallet from keys");
+ setSeedLanguage(language);
+ LOG_PRINT_L1("Generated new wallet from keys with seed language: " + language);
}
else {
m_wallet->generate(path, "", address, viewkey);
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index f56506772..96ba04c47 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -5277,6 +5277,10 @@ uint64_t wallet2::import_key_images(const std::vector<std::pair<crypto::key_imag
std::vector<const crypto::public_key*> pkeys;
pkeys.push_back(&pkey);
+ THROW_WALLET_EXCEPTION_IF(!(rct::scalarmultKey(rct::ki2rct(key_image), rct::curveOrder()) == rct::identity()),
+ error::wallet_internal_error, "Key image out of validity domain: input " + boost::lexical_cast<std::string>(n) + "/"
+ + boost::lexical_cast<std::string>(signed_key_images.size()) + ", key image " + epee::string_tools::pod_to_hex(key_image));
+
THROW_WALLET_EXCEPTION_IF(!crypto::check_ring_signature((const crypto::hash&)key_image, key_image, pkeys, &signature),
error::wallet_internal_error, "Signature check failed: input " + boost::lexical_cast<std::string>(n) + "/"
+ boost::lexical_cast<std::string>(signed_key_images.size()) + ", key image " + epee::string_tools::pod_to_hex(key_image)