summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDiadlo <polsha3@gmail.com>2016-12-20 09:39:14 +0300
committerDiadlo <polsha3@gmail.com>2017-01-04 00:40:17 +0300
commit06a68f0f5f7fd305e1179d3fd02b4399a2cbc4b8 (patch)
tree4b30be76ac1554707c5a5736291f89fa1989d321 /CMakeLists.txt
parent6b344c3041ee2176c02753df734b6fb59ac74387 (diff)
Add secure memcmp and memzero implementation.
Implementation mostly taken from libsodium utils. Fix #347
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d6bfe4c..402b74e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,7 +204,11 @@ apidsl(
204 toxcore/crypto_core.api.h) 204 toxcore/crypto_core.api.h)
205add_module(toxcrypto 205add_module(toxcrypto
206 toxcore/crypto_core.c 206 toxcore/crypto_core.c
207 toxcore/crypto_core.h) 207 toxcore/crypto_core.h
208 toxcore/crypto_core_mem.c)
209include(CheckFunctionExists)
210check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO)
211check_function_exists(memset_s HAVE_MEMSET_S)
208target_link_modules(toxcrypto ${LIBSODIUM_LIBRARIES}) 212target_link_modules(toxcrypto ${LIBSODIUM_LIBRARIES})
209if(WIN32) 213if(WIN32)
210 target_link_modules(toxcrypto ws2_32) # for htonl 214 target_link_modules(toxcrypto ws2_32) # for htonl