From 204e6054c0b8cc529270674fbefdd2f79b15f110 Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 23 May 2019 03:24:57 +0300 Subject: [PATCH 1/3] === build number: 30 -> 31 === --- src/version.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.h.in b/src/version.h.in index ea9268f0..548d6490 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -2,6 +2,6 @@ #define BUILD_COMMIT_ID "@VERSION@" #define PROJECT_VERSION "1.0" -#define PROJECT_VERSION_BUILD_NO 30 +#define PROJECT_VERSION_BUILD_NO 31 #define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO) #define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]" From f8f0e7a8179a12de214a24f18419efb8740ab81d Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 23 May 2019 03:47:41 +0300 Subject: [PATCH 2/3] coretests: wallet_rpc_integrated_address_transfer fixed --- tests/core_tests/wallet_rpc_tests.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/core_tests/wallet_rpc_tests.cpp b/tests/core_tests/wallet_rpc_tests.cpp index c4ee2e51..4b25aeb9 100644 --- a/tests/core_tests/wallet_rpc_tests.cpp +++ b/tests/core_tests/wallet_rpc_tests.cpp @@ -117,7 +117,6 @@ bool wallet_rpc_integrated_address_transfer::c1(currency::core& c, size_t ev_ind tools::wallet_rpc::COMMAND_RPC_TRANSFER::request req = AUTO_VAL_INIT(req); req.fee = TESTS_DEFAULT_FEE; req.mixin = 0; - req.unlock_time = 0; tools::wallet_rpc::trnsfer_destination tds = AUTO_VAL_INIT(tds); tds.address = alice_integrated_address; tds.amount = MK_TEST_COINS(3); From 007769124a5bcab697df1ef18405d24a9144801d Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 23 May 2019 05:07:59 +0300 Subject: [PATCH 3/3] made crypto_ops::validate_key_image exception safe --- src/crypto/crypto.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/crypto/crypto.cpp b/src/crypto/crypto.cpp index eef82cc7..ae9503a9 100644 --- a/src/crypto/crypto.cpp +++ b/src/crypto/crypto.cpp @@ -27,9 +27,11 @@ namespace crypto { DISABLE_GCC_AND_CLANG_WARNING(strict-aliasing) + const unsigned char Z_[32] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; const unsigned char I_[32] = { 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; const unsigned char L_[32] = { 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 }; + const key_image Z = *reinterpret_cast(&Z_); const key_image I = *reinterpret_cast(&I_); const key_image L = *reinterpret_cast(&L_); @@ -148,10 +150,7 @@ namespace crypto { ge_p3 A = ge_p3(); ge_p2 R = ge_p2(); if (ge_frombytes_vartime(&A, reinterpret_cast(&P)) != 0) - { - crypto_assert(false); - throw std::runtime_error(__func__); - } + return Z; ge_scalarmult(&R, reinterpret_cast(&a), &A); key_image a_p = key_image(); ge_tobytes(reinterpret_cast(&a_p), &R); @@ -161,9 +160,8 @@ namespace crypto { bool crypto_ops::validate_key_image(const key_image& ki) { if (!(scalarmult_key(ki, L) == I)) - { return false; - } + return true; }