summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt27
1 files changed, 7 insertions, 20 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a00617..371530b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,13 +30,10 @@ set(WITH_CMDLINE_OPERATION TRUE CACHE BOOL "Include support for setting options
set(WITH_CMDLINE_COMMANDS TRUE CACHE BOOL "Include support for setting handler scripts (e.g. --on-up) on the command line")
-set(WITH_CRYPTO_AES128CTR_NACL TRUE CACHE BOOL "Include the AES128-CTR implementation from the NaCl library")
-set(WITH_CRYPTO_GHASH_BUILTIN TRUE CACHE BOOL "Include the built-in GHASH implementation")
+set(WITH_CIPHER_AES128_CTR TRUE CACHE BOOL "Include the AES128-CTR cipher algorithm")
+set(WITH_CIPHER_AES128_CTR_NACL TRUE CACHE BOOL "Include the AES128-CTR implementation from the NaCl library")
-if(LINUX)
- set(WITH_CRYPTO_AES128CTR_LINUX TRUE CACHE BOOL "Support using the AES128-CTR implementation in the Linux kernel")
- set(WITH_CRYPTO_GHASH_LINUX TRUE CACHE BOOL "Support using the GHASH implementation in the Linux kernel")
-endif(LINUX)
+set(WITH_CRYPTO_GHASH_BUILTIN TRUE CACHE BOOL "Include the built-in GHASH implementation")
set(WITH_METHOD_XSALSA20_POLY1305 TRUE CACHE BOOL "Include xsalsa20-poly1305 method")
set(WITH_METHOD_AES128_GCM TRUE CACHE BOOL "Include aes128-gcm method")
@@ -47,31 +44,21 @@ set(USE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl")
set(MAX_CONFIG_DEPTH 10 CACHE STRING "Maximum config include depth")
-if(WITH_CRYPTO_AES128CTR_NACL OR WITH_CRYPTO_AES128CTR_LINUX)
- set(WITH_CRYPTO_AES128CTR TRUE)
-endif(WITH_CRYPTO_AES128CTR_NACL OR WITH_CRYPTO_AES128CTR_LINUX)
-
-if(WITH_CRYPTO_GHASH_BUILTIN OR WITH_CRYPTO_GHASH_LINUX)
+if(WITH_CRYPTO_GHASH_BUILTIN)
set(WITH_CRYPTO_GHASH TRUE)
-endif(WITH_CRYPTO_GHASH_BUILTIN OR WITH_CRYPTO_GHASH_LINUX)
+endif(WITH_CRYPTO_GHASH_BUILTIN)
# Ensure the value is numeric
math(EXPR MAX_CONFIG_DEPTH_NUM ${MAX_CONFIG_DEPTH})
-set(USE_CRYPTO_AES128CTR FALSE)
set(USE_CRYPTO_GHASH FALSE)
if(WITH_METHOD_AES128_GCM)
- set(USE_CRYPTO_AES128CTR TRUE)
set(USE_CRYPTO_GHASH TRUE)
endif(WITH_METHOD_AES128_GCM)
-if(USE_CRYPTO_AES128CTR AND NOT WITH_CRYPTO_AES128CTR)
- MESSAGE(FATAL_ERROR "No AES128-CTR implementation was selected, but a selected method needs it.")
-endif(USE_CRYPTO_AES128CTR AND NOT WITH_CRYPTO_AES128CTR)
-
if(USE_CRYPTO_GHASH AND NOT WITH_CRYPTO_GHASH)
MESSAGE(FATAL_ERROR "No GHASH implementation was selected, but a selected method needs it.")
endif(USE_CRYPTO_GHASH AND NOT WITH_CRYPTO_GHASH)
@@ -95,7 +82,7 @@ set(NACL_LIBRARY_DIRS "")
set(NACL_LIBRARIES "")
set(NACL_LDFLAGS_OTHER "")
-if(WITH_METHOD_XSALSA20_POLY1305 OR WITH_CRYPTO_AES128CTR_NACL)
+if(WITH_METHOD_XSALSA20_POLY1305 OR WITH_CIPHER_AES128_CTR_NACL)
if(USE_LIBSODIUM)
pkg_check_modules(SODIUM REQUIRED libsodium)
@@ -114,7 +101,7 @@ if(WITH_METHOD_XSALSA20_POLY1305 OR WITH_CRYPTO_AES128CTR_NACL)
set(NACL_INCLUDE_DIRS "${NACL_INCLUDE_DIR}")
set(NACL_LIBRARIES "${NACL_LIBRARY}")
endif(USE_LIBSODIUM)
-endif(WITH_METHOD_XSALSA20_POLY1305 OR WITH_CRYPTO_AES128CTR_NACL)
+endif()
if(WITH_CAPABILITIES)