aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorcslashm <cslashm@gmail.com>2018-02-20 17:01:27 +0100
committerCédric <cslashm@gmail.com>2018-03-04 12:54:53 +0100
commite745c1e38da8e54032660894bb2db0e9a49cccf2 (patch)
treefba40dea29a948b8a4904b4de189d4adc605ec6e /CMakeLists.txt
parentMerge pull request #3245 (diff)
downloadmonero-e745c1e38da8e54032660894bb2db0e9a49cccf2.tar.xz
Code modifications to integrate Ledger HW device into monero-wallet-cli.
The basic approach it to delegate all sensitive data (master key, secret ephemeral key, key derivation, ....) and related operations to the device. As device has low memory, it does not keep itself the values (except for view/spend keys) but once computed there are encrypted (with AES are equivalent) and return back to monero-wallet-cli. When they need to be manipulated by the device, they are decrypted on receive. Moreover, using the client for storing the value in encrypted form limits the modification in the client code. Those values are transfered from one C-structure to another one as previously. The code modification has been done with the wishes to be open to any other hardware wallet. To achieve that a C++ class hw::Device has been introduced. Two initial implementations are provided: the "default", which remaps all calls to initial Monero code, and the "Ledger", which delegates all calls to Ledger device.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0be28845..d60eecbc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -412,6 +412,8 @@ if(STATIC AND NOT IOS)
endif()
endif()
+find_package(PCSC)
+
add_definition_if_library_exists(c memset_s "string.h" HAVE_MEMSET_S)
add_definition_if_library_exists(c explicit_bzero "strings.h" HAVE_EXPLICIT_BZERO)
add_definition_if_function_found(strptime HAVE_STRPTIME)
@@ -456,6 +458,13 @@ endif()
include_directories(${LIBUNWIND_INCLUDE})
link_directories(${LIBUNWIND_LIBRARY_DIRS})
+# Final setup for libpcsc
+if (PCSC_FOUND)
+ add_definitions(-DHAVE_PCSC)
+ include_directories(${PCSC_INCLUDE_DIR})
+ link_directories(${LIBPCSC_LIBRARY_DIRS})
+endif()
+
if(MSVC)
add_definitions("/bigobj /MP /W3 /GS- /D_CRT_SECURE_NO_WARNINGS /wd4996 /wd4345 /D_WIN32_WINNT=0x0600 /DWIN32_LEAN_AND_MEAN /DGTEST_HAS_TR1_TUPLE=0 /FIinline_c.h /D__SSE4_1__")
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Dinline=__inline")