mirror of
https://github.com/vgough/encfs.git
synced 2024-12-29 10:09:20 +01:00
fixes config.h setup for crypto options
git-svn-id: http://encfs.googlecode.com/svn/trunk@102 db9cf616-1c43-0410-9cb8-a902689de0d6
This commit is contained in:
parent
b55fd2b010
commit
33b8c00a67
@ -11,16 +11,29 @@ option (WITH_OPENSSL "WithOpenSSL" OFF)
|
||||
option (WITH_COMMON_CRYPTO "WithCommonCrypto" OFF)
|
||||
option (WITH_BOTAN "WithBotan" ON)
|
||||
|
||||
if (WITH_BOTAN)
|
||||
set (WITH_COMMON_CRYPTO OFF)
|
||||
set (WITH_OPENSSL OFF)
|
||||
elseif (WITH_COMMON_CRYPTO)
|
||||
set (WITH_OPENSSL OFF)
|
||||
endif (WITH_BOTAN)
|
||||
|
||||
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
|
||||
"${CMAKE_SOURCE_DIR}/CMakeModules/")
|
||||
|
||||
# Include Crypto checks here so that they can set values in config.h
|
||||
if (WITH_COMMON_CRYPTO)
|
||||
set (WITH_BOTAN OFF)
|
||||
set (WITH_OPENSSL OFF)
|
||||
|
||||
find_library (SECURITY_FRAMEWORK Security)
|
||||
mark_as_advanced (SECURITY_FRAMEWORK)
|
||||
elseif (WITH_BOTAN)
|
||||
set (WITH_COMMON_CRYPTO OFF)
|
||||
set (WITH_OPENSSL OFF)
|
||||
|
||||
find_package (Botan REQUIRED)
|
||||
elseif (WITH_OPENSSL)
|
||||
set (WITH_BOTAN OFF)
|
||||
set (WITH_COMMON_CRYPTO OFF)
|
||||
|
||||
find_package (OpenSSL REQUIRED)
|
||||
include (OpenSSLTests)
|
||||
endif (WITH_COMMON_CRYPTO)
|
||||
|
||||
# Tweak compiler flags.
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
|
||||
|
||||
|
@ -1,18 +1,13 @@
|
||||
link_directories (${Encfs_BINARY_DIR}/base)
|
||||
|
||||
if (WITH_COMMON_CRYPTO)
|
||||
find_library (SECURITY_FRAMEWORK Security)
|
||||
mark_as_advanced (SECURITY_FRAMEWORK)
|
||||
set (EXTRA_LIBS ${SECURITY_FRAMEWORK})
|
||||
set (EXTRA_SOURCE CommonCrypto.cpp)
|
||||
elseif (WITH_OPENSSL)
|
||||
find_package (OpenSSL REQUIRED)
|
||||
include (OpenSSLTests)
|
||||
include_directories (${OPENSSL_INCLUDE_DIR})
|
||||
set (EXTRA_LIBS ${OPENSSL_LIBRARIES})
|
||||
set (EXTRA_SOURCE openssl.cpp)
|
||||
elseif (WITH_BOTAN)
|
||||
find_package (Botan REQUIRED)
|
||||
set (EXTRA_LIBS ${BOTAN_LIBRARIES})
|
||||
set (EXTRA_SOURCE botan.cpp)
|
||||
include_directories (${BOTAN_INCLUDE_DIR})
|
||||
|
@ -131,6 +131,9 @@ class OpenSSLCipher : public BlockCipher {
|
||||
|
||||
return false;
|
||||
}
|
||||
#ifdef HAVE_VALGRIND_MEMCHECK_H
|
||||
VALGRIND_MAKE_MEM_DEFINED(out, length);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user