summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2014-03-13 15:09:17 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2014-03-13 15:09:17 +0100
commite715379e49483f8200abec5bc7ff48f70d73a0cf (patch)
tree8ffce5c4787ff51f6101f6995737530a71ea3f93
parent45da9c9f296215a4d9ff77db0e6d48bda105ddee (diff)
downloadfastd-e715379e49483f8200abec5bc7ff48f70d73a0cf.tar
fastd-e715379e49483f8200abec5bc7ff48f70d73a0cf.zip
Rename USE_LIBSODIUM and USE_OPENSSL cmake flags to ENABLE_LIBSODIUM and ENABLE_OPENSSL
-rw-r--r--cmake/check_reqs.cmake4
-rw-r--r--cmake/config.cmake4
-rw-r--r--cmake/deps.cmake12
-rw-r--r--src/crypto/cipher/aes128_ctr/openssl/CMakeLists.txt4
-rw-r--r--src/fastd.c6
-rw-r--r--src/fastd_config.h.in2
6 files changed, 16 insertions, 16 deletions
diff --git a/cmake/check_reqs.cmake b/cmake/check_reqs.cmake
index 8f41285..58fb05d 100644
--- a/cmake/check_reqs.cmake
+++ b/cmake/check_reqs.cmake
@@ -6,9 +6,9 @@ if(${nacl_required})
message(FATAL_ERROR "NaCl is not available, but a selected module needs it")
endif()
- if(USE_LIBSODIUM)
+ if(ENABLE_LIBSODIUM)
set(HAVE_LIBSODIUM TRUE)
- endif(USE_LIBSODIUM)
+ endif(ENABLE_LIBSODIUM)
else(${nacl_required})
set(NACL_INCLUDE_DIRS "")
set(NACL_CFLAGS_OTHER "")
diff --git a/cmake/config.cmake b/cmake/config.cmake
index 96b39bc..a678d4e 100644
--- a/cmake/config.cmake
+++ b/cmake/config.cmake
@@ -18,8 +18,8 @@ endif()
set(WITH_CAPABILITIES ${LINUX} CACHE BOOL "Include support for POSIX capabilities")
-set(USE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl")
-set(USE_OPENSSL FALSE CACHE BOOL "Use OpenSSL")
+set(ENABLE_LIBSODIUM FALSE CACHE BOOL "Use libsodium instead of NaCl")
+set(ENABLE_OPENSSL FALSE CACHE BOOL "Enable crypto implementations using OpenSSL")
set(WITH_CMDLINE_USER TRUE CACHE BOOL "Include support for setting user/group related options on the command line")
set(WITH_CMDLINE_LOGGING TRUE CACHE BOOL "Include support for setting logging related options on the command line")
diff --git a/cmake/deps.cmake b/cmake/deps.cmake
index 76f5296..d9dff1e 100644
--- a/cmake/deps.cmake
+++ b/cmake/deps.cmake
@@ -16,7 +16,7 @@ set(NACL_LIBRARY_DIRS "")
set(NACL_LIBRARIES "")
set(NACL_LDFLAGS_OTHER "")
-if(USE_LIBSODIUM)
+if(ENABLE_LIBSODIUM)
pkg_check_modules(SODIUM libsodium)
if(SODIUM_FOUND)
@@ -30,27 +30,27 @@ if(USE_LIBSODIUM)
set(NACL_LIBRARIES "${SODIUM_LIBRARIES}")
set(NACL_LDFLAGS_OTHER "${SODIUM_LDFLAGS_OTHER}")
endif(SODIUM_FOUND)
-else(USE_LIBSODIUM)
+else(ENABLE_LIBSODIUM)
find_package(NaCl)
if(NACL_FOUND)
set(NACL_INCLUDE_DIRS "${NACL_INCLUDE_DIR}")
set(NACL_LIBRARIES "${NACL_LIBRARY}")
endif(NACL_FOUND)
-endif(USE_LIBSODIUM)
+endif(ENABLE_LIBSODIUM)
set_property(GLOBAL PROPERTY NACL_REQUIRED FALSE)
-if(USE_OPENSSL)
+if(ENABLE_OPENSSL)
pkg_check_modules(OPENSSL_CRYPTO REQUIRED libcrypto)
-else(USE_OPENSSL)
+else(ENABLE_OPENSSL)
set(OPENSSL_CRYPTO_INCLUDE_DIRS "")
set(OPENSSL_CRYPTO_CFLAGS_OTHER "")
set(OPENSSL_CRYPTO_LIBRARY_DIRS "")
set(OPENSSL_CRYPTO_LIBRARIES "")
set(OPENSSL_CRYPTO_LDFLAGS_OTHER "")
-endif(USE_OPENSSL)
+endif(ENABLE_OPENSSL)
if(WITH_CAPABILITIES)
diff --git a/src/crypto/cipher/aes128_ctr/openssl/CMakeLists.txt b/src/crypto/cipher/aes128_ctr/openssl/CMakeLists.txt
index 5454b3f..18389f5 100644
--- a/src/crypto/cipher/aes128_ctr/openssl/CMakeLists.txt
+++ b/src/crypto/cipher/aes128_ctr/openssl/CMakeLists.txt
@@ -1,6 +1,6 @@
-if(USE_OPENSSL)
+if(ENABLE_OPENSSL)
fastd_cipher_impl(aes128-ctr openssl
aes128_ctr_openssl.c
)
fastd_cipher_impl_include_directories(aes128-ctr openssl ${OPENSSL_INCLUDE_DIRS})
-endif(USE_OPENSSL)
+endif(ENABLE_OPENSSL)
diff --git a/src/fastd.c b/src/fastd.c
index 1f80939..58237b1 100644
--- a/src/fastd.c
+++ b/src/fastd.c
@@ -45,7 +45,7 @@
#include <sodium/core.h>
#endif
-#ifdef USE_OPENSSL
+#ifdef ENABLE_OPENSSL
#include <openssl/conf.h>
#include <openssl/evp.h>
#include <openssl/err.h>
@@ -910,7 +910,7 @@ int main(int argc, char *argv[]) {
sodium_init();
#endif
-#ifdef USE_OPENSSL
+#ifdef ENABLE_OPENSSL
ERR_load_crypto_strings();
OpenSSL_add_all_algorithms();
OPENSSL_config(NULL);
@@ -1011,7 +1011,7 @@ int main(int argc, char *argv[]) {
free(ctx.eth_addr);
free(ctx.ifname);
-#ifdef USE_OPENSSL
+#ifdef ENABLE_OPENSSL
CONF_modules_free();
EVP_cleanup();
ERR_free_strings();
diff --git a/src/fastd_config.h.in b/src/fastd_config.h.in
index 29384cd..39856c4 100644
--- a/src/fastd_config.h.in
+++ b/src/fastd_config.h.in
@@ -47,7 +47,7 @@
#cmakedefine HAVE_LIBSODIUM
-#cmakedefine USE_OPENSSL
+#cmakedefine ENABLE_OPENSSL
#define MAX_CONFIG_DEPTH @MAX_CONFIG_DEPTH_NUM@