aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--contrib/epee/src/mlog.cpp2
-rw-r--r--contrib/epee/src/net_ssl.cpp4
-rw-r--r--src/common/password.cpp6
-rw-r--r--src/lmdb/error.cpp2
-rw-r--r--src/rpc/core_rpc_server.cpp7
-rw-r--r--src/wallet/wallet2.cpp2
-rw-r--r--src/wallet/wallet_rpc_server.cpp12
8 files changed, 25 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c19c9dba7..037b9cb50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -898,9 +898,9 @@ elseif(Boost_FOUND)
set(BOOST_BEFORE_1_62 true)
endif()
if (BOOST_BEFORE_1_62)
- message(FATAL_ERROR "Boost older than 1.62 is too old to link with OpenSSL 1.1 or newer. "
+ message(FATAL_ERROR "Boost ${Boost_VERSION} (older than 1.62) is too old to link with OpenSSL ${OPENSSL_VERSION} (1.1 or newer) found at ${OPENSSL_INCLUDE_DIR} and ${OPENSSL_LIBRARIES}. "
"Update Boost or install OpenSSL 1.0 and set path to it when running cmake: "
- "cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0;/usr/lib/openssl-1.0'")
+ "cmake -DOPENSSL_ROOT_DIR='/usr/include/openssl-1.0'")
endif()
endif()
diff --git a/contrib/epee/src/mlog.cpp b/contrib/epee/src/mlog.cpp
index a8bfd114d..4c6ad5516 100644
--- a/contrib/epee/src/mlog.cpp
+++ b/contrib/epee/src/mlog.cpp
@@ -100,7 +100,7 @@ static const char *get_default_categories(int level)
switch (level)
{
case 0:
- categories = "*:WARNING,net:FATAL,net.http:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,serialization:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO";
+ categories = "*:WARNING,net:FATAL,net.http:FATAL,net.ssl:FATAL,net.p2p:FATAL,net.cn:FATAL,global:INFO,verify:FATAL,serialization:FATAL,stacktrace:INFO,logging:INFO,msgwriter:INFO";
break;
case 1:
categories = "*:INFO,global:INFO,stacktrace:INFO,logging:INFO,msgwriter:INFO,perf.*:DEBUG";
diff --git a/contrib/epee/src/net_ssl.cpp b/contrib/epee/src/net_ssl.cpp
index ba0bef0c7..7d48d2a64 100644
--- a/contrib/epee/src/net_ssl.cpp
+++ b/contrib/epee/src/net_ssl.cpp
@@ -352,7 +352,7 @@ boost::asio::ssl::context ssl_options_t::create_context() const
MERROR("Failed to use generated EC private key for " << NID_secp256k1);
else
ok = true;
- // don't free the cert, the CTX owns it now
+ X509_free(cert);
EVP_PKEY_free(pkey);
#endif
@@ -362,7 +362,7 @@ boost::asio::ssl::context ssl_options_t::create_context() const
MERROR("Failed to use generated RSA private key for RSA");
else
ok = true;
- // don't free the cert, the CTX owns it now
+ X509_free(cert);
EVP_PKEY_free(pkey);
CHECK_AND_ASSERT_THROW_MES(ok, "Failed to use any generated certificate");
diff --git a/src/common/password.cpp b/src/common/password.cpp
index 03d13db42..33e1f48fd 100644
--- a/src/common/password.cpp
+++ b/src/common/password.cpp
@@ -57,7 +57,7 @@ namespace
DWORD mode_old;
::GetConsoleMode(h_cin, &mode_old);
- DWORD mode_new = mode_old & ~(hide_input ? ENABLE_ECHO_INPUT : 0);
+ DWORD mode_new = mode_old & ~((hide_input ? ENABLE_ECHO_INPUT : 0) | ENABLE_LINE_INPUT);
::SetConsoleMode(h_cin, mode_new);
bool r = true;
@@ -77,10 +77,6 @@ namespace
}
else if (ucs2_ch == L'\r')
{
- continue;
- }
- else if (ucs2_ch == L'\n')
- {
std::cout << std::endl;
break;
}
diff --git a/src/lmdb/error.cpp b/src/lmdb/error.cpp
index 359677064..91479521e 100644
--- a/src/lmdb/error.cpp
+++ b/src/lmdb/error.cpp
@@ -55,7 +55,7 @@ namespace {
break; // map to nothing generic
case MDB_PAGE_NOTFOUND:
case MDB_CORRUPTED:
- return std::errc::state_not_recoverable;
+ return std::errc::bad_address;
case MDB_PANIC:
case MDB_VERSION_MISMATCH:
case MDB_INVALID:
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp
index bbcbc2fcd..5777370fc 100644
--- a/src/rpc/core_rpc_server.cpp
+++ b/src/rpc/core_rpc_server.cpp
@@ -2107,6 +2107,13 @@ namespace cryptonote
bool core_rpc_server::on_update(const COMMAND_RPC_UPDATE::request& req, COMMAND_RPC_UPDATE::response& res, const connection_context *ctx)
{
PERF_TIMER(on_update);
+
+ if (m_core.offline())
+ {
+ res.status = "Daemon is running offline";
+ return true;
+ }
+
static const char software[] = "monero";
#ifdef BUILD_TAG
static const char buildtag[] = BOOST_PP_STRINGIZE(BUILD_TAG);
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 4a4abd872..47a278ceb 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -344,7 +344,7 @@ std::unique_ptr<tools::wallet2> make_basic(const boost::program_options::variabl
{
std::vector<std::vector<uint8_t>> ssl_allowed_fingerprints{ daemon_ssl_allowed_fingerprints.size() };
std::transform(daemon_ssl_allowed_fingerprints.begin(), daemon_ssl_allowed_fingerprints.end(), ssl_allowed_fingerprints.begin(), epee::from_hex::vector);
- for (const auto &fpr: daemon_ssl_allowed_fingerprints)
+ for (const auto &fpr: ssl_allowed_fingerprints)
{
THROW_WALLET_EXCEPTION_IF(fpr.size() != SSL_FINGERPRINT_SIZE, tools::error::wallet_internal_error,
"SHA-256 fingerprint should be " BOOST_PP_STRINGIZE(SSL_FINGERPRINT_SIZE) " bytes long.");
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index a51057d0b..16a2b3808 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -255,7 +255,7 @@ namespace tools
{
std::vector<std::vector<uint8_t>> allowed_fingerprints{ rpc_ssl_allowed_fingerprints.size() };
std::transform(rpc_ssl_allowed_fingerprints.begin(), rpc_ssl_allowed_fingerprints.end(), allowed_fingerprints.begin(), epee::from_hex::vector);
- for (const auto &fpr: rpc_ssl_allowed_fingerprints)
+ for (const auto &fpr: allowed_fingerprints)
{
if (fpr.size() != SSL_FINGERPRINT_SIZE)
{
@@ -394,7 +394,7 @@ namespace tools
entry.destinations.push_back(wallet_rpc::transfer_destination());
wallet_rpc::transfer_destination &td = entry.destinations.back();
td.amount = d.amount;
- td.address = get_account_address_as_str(m_wallet->nettype(), d.is_subaddress, d.addr);
+ td.address = d.original.empty() ? get_account_address_as_str(m_wallet->nettype(), d.is_subaddress, d.addr) : d.original;
}
entry.type = "out";
@@ -419,6 +419,14 @@ namespace tools
entry.amount = pd.m_amount_in - pd.m_change - entry.fee;
entry.unlock_time = pd.m_tx.unlock_time;
entry.note = m_wallet->get_tx_note(txid);
+
+ for (const auto &d: pd.m_dests) {
+ entry.destinations.push_back(wallet_rpc::transfer_destination());
+ wallet_rpc::transfer_destination &td = entry.destinations.back();
+ td.amount = d.amount;
+ td.address = d.original.empty() ? get_account_address_as_str(m_wallet->nettype(), d.is_subaddress, d.addr) : d.original;
+ }
+
entry.type = is_failed ? "failed" : "pending";
entry.subaddr_index = { pd.m_subaddr_account, 0 };
for (uint32_t i: pd.m_subaddr_indices)