-PKG_CHECK_MODULES(KEY_MANAGER_DEP
- dlog
- openssl
- libsmack
- libcrypto
- libsystemd-daemon
- capi-base-common
- db-util
- REQUIRED
- )
FIND_PACKAGE(Threads REQUIRED)
SET(KEY_MANAGER_SRC_PATH ${PROJECT_SOURCE_DIR}/src)
SET(KEY_MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)
SET(KEY_MANAGER_SOURCES
- ${KEY_MANAGER_PATH}/main/key-manager-util.cpp
+ ${KEY_MANAGER_PATH}/main/cynara.cpp
${KEY_MANAGER_PATH}/main/generic-socket-manager.cpp
- ${KEY_MANAGER_PATH}/main/socket-manager.cpp
${KEY_MANAGER_PATH}/main/key-manager-main.cpp
- ${KEY_MANAGER_PATH}/service/ckm-service.cpp
+ ${KEY_MANAGER_PATH}/main/smack-check.cpp
+ ${KEY_MANAGER_PATH}/main/socket-2-id.cpp
+ ${KEY_MANAGER_PATH}/main/socket-manager.cpp
+ ${KEY_MANAGER_PATH}/main/thread-service.cpp
+ ${KEY_MANAGER_PATH}/service/access-control.cpp
+ ${KEY_MANAGER_PATH}/service/certificate-config.cpp
+ ${KEY_MANAGER_PATH}/service/certificate-store.cpp
${KEY_MANAGER_PATH}/service/ckm-logic.cpp
- ${KEY_MANAGER_PATH}/service/key-provider.cpp
- ${KEY_MANAGER_PATH}/service/ocsp.cpp
+ ${KEY_MANAGER_PATH}/service/ckm-service.cpp
${KEY_MANAGER_PATH}/service/crypto-logic.cpp
- ${KEY_MANAGER_PATH}/service/CryptoService.cpp
- ${KEY_MANAGER_PATH}/service/file-system.cpp
${KEY_MANAGER_PATH}/service/db-crypto.cpp
- ${KEY_MANAGER_PATH}/service/ocsp-service.cpp
+ ${KEY_MANAGER_PATH}/service/encryption-logic.cpp
+ ${KEY_MANAGER_PATH}/service/encryption-service.cpp
+ ${KEY_MANAGER_PATH}/service/file-lock.cpp
+ ${KEY_MANAGER_PATH}/service/file-system.cpp
+ ${KEY_MANAGER_PATH}/service/for-each-file.cpp
+ ${KEY_MANAGER_PATH}/service/glib-logic.cpp
+ ${KEY_MANAGER_PATH}/service/glib-service.cpp
+ ${KEY_MANAGER_PATH}/service/key-provider.cpp
+ ${KEY_MANAGER_PATH}/service/ocsp.cpp
${KEY_MANAGER_PATH}/service/ocsp-logic.cpp
+ ${KEY_MANAGER_PATH}/service/ocsp-service.cpp
+ ${KEY_MANAGER_PATH}/service/ss-migrate.cpp
+ ${KEY_MANAGER_PATH}/service/ss-crypto.cpp
+ ${KEY_MANAGER_PATH}/service/permission.cpp
+ ${KEY_MANAGER_PATH}/initial-values/parser.cpp
+ ${KEY_MANAGER_PATH}/initial-values/BufferHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/CertHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/DataHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/KeyHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/PermissionHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/InitialValueHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/InitialValuesFile.cpp
+ ${KEY_MANAGER_PATH}/initial-values/NoCharactersHandler.cpp
+ ${KEY_MANAGER_PATH}/initial-values/xml-utils.cpp
+ ${KEY_MANAGER_PATH}/initial-values/initial-value-loader.cpp
+ ${KEY_MANAGER_PATH}/dpl/db/src/sql_connection.cpp
+ ${KEY_MANAGER_PATH}/dpl/db/src/naive_synchronization_object.cpp
+ ${KEY_MANAGER_PATH}/crypto/sw-backend/obj.cpp
+ ${KEY_MANAGER_PATH}/crypto/sw-backend/internals.cpp
+ ${KEY_MANAGER_PATH}/crypto/sw-backend/store.cpp
+ ${KEY_MANAGER_PATH}/crypto/sw-backend/kbkdf.cpp
+ ${KEY_MANAGER_PATH}/crypto/sw-backend/ctx.cpp
+ ${KEY_MANAGER_PATH}/crypto/platform/decider.cpp
+ ${SECURITY_MANAGER_WRAPPER_PATH}
+ ${CYNARA_WRAPPER_PATH}
+ ${TZ_BACKEND_SOURCES}
+ ${SE_BACKEND_SOURCES}
)
SET_SOURCE_FILES_PROPERTIES(
INCLUDE_DIRECTORIES(
${KEY_MANAGER_SRC_PATH}/include
+ ${PROJECT_SOURCE_DIR}/common
${KEY_MANAGER_PATH}/main
${KEY_MANAGER_PATH}/common
${KEY_MANAGER_PATH}/service
- ${KEY_MANAGER_PATH}/sqlcipher
+ ${KEY_MANAGER_PATH}/initial-values
${KEY_MANAGER_PATH}/dpl/core/include
${KEY_MANAGER_PATH}/dpl/log/include
${KEY_MANAGER_PATH}/dpl/db/include
+ ${KEY_MANAGER_PATH}/crypto
)
+LINK_DIRECTORIES(${KEY_MANAGER_DEP_LIBRARY_DIRS})
+
ADD_EXECUTABLE(${TARGET_KEY_MANAGER} ${KEY_MANAGER_SOURCES})
TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER}
${CMAKE_THREAD_LIBS_INIT}
${KEY_MANAGER_DEP_LIBRARIES}
${TARGET_KEY_MANAGER_COMMON}
+ ${KM_LINK_EXTRA_DEPS}
+ -ldl
)
-
################################################################################
SET(KEY_MANAGER_CLIENT_VERSION_MAJOR 1)
SET(KEY_MANAGER_CLIENT_VERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}.0.1)
SET(KEY_MANAGER_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
+SET(KEY_MANAGER_CLIENT_ASYNC_SRC_PATH ${KEY_MANAGER_PATH}/client-async)
SET(KEY_MANAGER_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
INCLUDE_DIRECTORIES(
${KEY_MANAGER_PATH}/client
+ ${KEY_MANAGER_PATH}/client-async
${KEY_MANAGER_PATH}/client-capi
${KEY_MANAGER_PATH}/common
${KEY_MANAGER_PATH}/dpl/core/include
SET(KEY_MANAGER_CLIENT_SOURCES
${KEY_MANAGER_CLIENT_SRC_PATH}/client-common.cpp
- ${KEY_MANAGER_CLIENT_SRC_PATH}/client-error.cpp
+ ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager.cpp
${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager-impl.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/client-manager-async.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/client-manager-async-impl.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/connection-thread.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/async-request.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/service.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/storage-receiver.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/ocsp-receiver.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/encryption-receiver.cpp
+ ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/descriptor-set.cpp
${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type.cpp
- ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-error.cpp
${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-manager.cpp
${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type-converter.cpp
- ${KEY_MANAGER_PATH}/common/base64.cpp
- ${KEY_MANAGER_PATH}/common/digest.cpp
- ${KEY_MANAGER_PATH}/common/protocols.cpp
- ${KEY_MANAGER_PATH}/common/message-buffer.cpp
- ${KEY_MANAGER_PATH}/common/smack-check.cpp
- ${KEY_MANAGER_PATH}/common/certificate-impl.cpp
- ${KEY_MANAGER_PATH}/common/certificate-store.cpp
- ${KEY_MANAGER_PATH}/common/generic-key.cpp
- ${KEY_MANAGER_PATH}/common/pkcs12-impl.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/abstract_log_provider.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/dlog_log_provider.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/log.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/old_style_log_provider.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/assert.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/binary_queue.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/colors.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/exception.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/noncopyable.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/serialization.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/singleton.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/string.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/errno_string.cpp
)
ADD_LIBRARY(${TARGET_KEY_MANAGER_CLIENT} SHARED ${KEY_MANAGER_CLIENT_SOURCES})
SET_TARGET_PROPERTIES(
${TARGET_KEY_MANAGER_CLIENT}
PROPERTIES
- COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
+ COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wno-deprecated-declarations"
SOVERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}
VERSION ${KEY_MANAGER_CLIENT_VERSION}
)
TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CLIENT}
${KEY_MANAGER_DEP_LIBRARIES}
+ ${TARGET_KEY_MANAGER_COMMON}
)
################################################################################
${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-common.cpp
${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-control.cpp
${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-type-converter.cpp
- ${KEY_MANAGER_PATH}/common/base64.cpp
- ${KEY_MANAGER_PATH}/common/digest.cpp
- ${KEY_MANAGER_PATH}/common/protocols.cpp
- ${KEY_MANAGER_PATH}/common/message-buffer.cpp
- ${KEY_MANAGER_PATH}/common/smack-check.cpp
- ${KEY_MANAGER_PATH}/common/certificate-impl.cpp
- ${KEY_MANAGER_PATH}/common/certificate-store.cpp
- ${KEY_MANAGER_PATH}/common/generic-key.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/abstract_log_provider.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/dlog_log_provider.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/log.cpp
- ${KEY_MANAGER_PATH}/dpl/log/src/old_style_log_provider.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/assert.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/binary_queue.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/colors.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/exception.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/noncopyable.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/serialization.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/singleton.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/string.cpp
- ${KEY_MANAGER_PATH}/dpl/core/src/errno_string.cpp
)
ADD_LIBRARY(${TARGET_KEY_MANAGER_CONTROL_CLIENT} SHARED ${KEY_MANAGER_CONTROL_CLIENT_SOURCES})
SET_TARGET_PROPERTIES(
${TARGET_KEY_MANAGER_CONTROL_CLIENT}
PROPERTIES
- COMPILE_FLAGS "-D_GNU_SOURCE -fPIC -fvisibility=default"
+ COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wno-deprecated-declarations"
SOVERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}
VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION}
)
TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CONTROL_CLIENT}
${KEY_MANAGER_DEP_LIBRARIES}
+ ${TARGET_KEY_MANAGER_COMMON}
)
################################################################################
INSTALL(TARGETS ${TARGET_KEY_MANAGER_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
INSTALL(TARGETS ${TARGET_KEY_MANAGER_CONTROL_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
-INSTALL(TARGETS ${TARGET_KEY_MANAGER} DESTINATION bin)
+INSTALL(TARGETS ${TARGET_KEY_MANAGER} DESTINATION ${BIN_DIR})
INSTALL(FILES
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager.h
+ ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager-async.h
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-certificate.h
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-control.h
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-error.h
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-pkcs12.h
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-raw-buffer.h
${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-type.h
+ ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-zero-memory.h
DESTINATION /usr/include/ckm/ckm
)
INSTALL(FILES
)
################################################################################
+CONFIGURE_FILE(
+ ${PROJECT_SOURCE_DIR}/packaging/key-manager.manifest.in
+ ${PROJECT_SOURCE_DIR}/key-manager.manifest @ONLY
+)
+
ADD_SUBDIRECTORY(manager)
-ADD_SUBDIRECTORY(listener)
+ADD_SUBDIRECTORY(pam_plugin)