1 IF (DEFINED WATCHDOG_ENABLED)
2 SET(EXTRA_KM_DEPS argos_watchdog)
3 ELSE (DEFINED WATCHDOG_ENABLED)
5 ENDIF (DEFINED WATCHDOG_ENABLED)
7 IF (TZ_BACKEND_ENABLED)
14 PKG_CHECK_MODULES(KEY_MANAGER_DEP
31 FIND_PACKAGE(Threads REQUIRED)
33 SET(KEY_MANAGER_SRC_PATH ${PROJECT_SOURCE_DIR}/src)
34 SET(KEY_MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)
36 SET(KEY_MANAGER_SOURCES
37 ${KEY_MANAGER_PATH}/main/cynara.cpp
38 ${KEY_MANAGER_PATH}/main/generic-socket-manager.cpp
39 ${KEY_MANAGER_PATH}/main/key-manager-main.cpp
40 ${KEY_MANAGER_PATH}/main/smack-check.cpp
41 ${KEY_MANAGER_PATH}/main/socket-2-id.cpp
42 ${KEY_MANAGER_PATH}/main/socket-manager.cpp
43 ${KEY_MANAGER_PATH}/main/thread-service.cpp
44 ${KEY_MANAGER_PATH}/service/access-control.cpp
45 ${KEY_MANAGER_PATH}/service/certificate-config.cpp
46 ${KEY_MANAGER_PATH}/service/certificate-store.cpp
47 ${KEY_MANAGER_PATH}/service/ckm-logic.cpp
48 ${KEY_MANAGER_PATH}/service/ckm-service.cpp
49 ${KEY_MANAGER_PATH}/service/crypto-logic.cpp
50 ${KEY_MANAGER_PATH}/service/db-crypto.cpp
51 ${KEY_MANAGER_PATH}/service/encryption-logic.cpp
52 ${KEY_MANAGER_PATH}/service/encryption-service.cpp
53 ${KEY_MANAGER_PATH}/service/file-lock.cpp
54 ${KEY_MANAGER_PATH}/service/file-system.cpp
55 ${KEY_MANAGER_PATH}/service/for-each-file.cpp
56 ${KEY_MANAGER_PATH}/service/glib-logic.cpp
57 ${KEY_MANAGER_PATH}/service/glib-service.cpp
58 ${KEY_MANAGER_PATH}/service/key-provider.cpp
59 ${KEY_MANAGER_PATH}/service/ocsp.cpp
60 ${KEY_MANAGER_PATH}/service/ocsp-logic.cpp
61 ${KEY_MANAGER_PATH}/service/ocsp-service.cpp
62 ${KEY_MANAGER_PATH}/service/ss-migrate.cpp
63 ${KEY_MANAGER_PATH}/service/ss-crypto.cpp
64 ${KEY_MANAGER_PATH}/initial-values/parser.cpp
65 ${KEY_MANAGER_PATH}/initial-values/BufferHandler.cpp
66 ${KEY_MANAGER_PATH}/initial-values/CertHandler.cpp
67 ${KEY_MANAGER_PATH}/initial-values/DataHandler.cpp
68 ${KEY_MANAGER_PATH}/initial-values/KeyHandler.cpp
69 ${KEY_MANAGER_PATH}/initial-values/PermissionHandler.cpp
70 ${KEY_MANAGER_PATH}/initial-values/InitialValueHandler.cpp
71 ${KEY_MANAGER_PATH}/initial-values/InitialValuesFile.cpp
72 ${KEY_MANAGER_PATH}/initial-values/NoCharactersHandler.cpp
73 ${KEY_MANAGER_PATH}/initial-values/SWKeyFile.cpp
74 ${KEY_MANAGER_PATH}/initial-values/xml-utils.cpp
75 ${KEY_MANAGER_PATH}/initial-values/initial-value-loader.cpp
76 ${KEY_MANAGER_PATH}/dpl/core/src/assert.cpp
77 ${KEY_MANAGER_PATH}/dpl/db/src/sql_connection.cpp
78 ${KEY_MANAGER_PATH}/dpl/db/src/naive_synchronization_object.cpp
79 ${KEY_MANAGER_PATH}/sqlcipher/sqlcipher.c
80 ${KEY_MANAGER_PATH}/crypto/sw-backend/obj.cpp
81 ${KEY_MANAGER_PATH}/crypto/sw-backend/internals.cpp
82 ${KEY_MANAGER_PATH}/crypto/sw-backend/store.cpp
83 ${KEY_MANAGER_PATH}/crypto/platform/decider.cpp
84 ${SECURITY_MANAGER_WRAPPER_PATH}
85 ${CYNARA_WRAPPER_PATH}
88 IF(TZ_BACKEND_ENABLED)
89 SET(KEY_MANAGER_SOURCES
90 ${KEY_MANAGER_SOURCES}
91 ${KEY_MANAGER_PATH}/crypto/tz-backend/obj.cpp
92 ${KEY_MANAGER_PATH}/crypto/tz-backend/store.cpp
93 ${KEY_MANAGER_PATH}/crypto/tz-backend/internals.cpp
94 ${KEY_MANAGER_PATH}/crypto/tz-backend/tz-context.cpp
95 ${KEY_MANAGER_PATH}/crypto/tz-backend/tz-memory.cpp
99 SET_SOURCE_FILES_PROPERTIES(
100 ${KEY_MANAGER_SOURCES}
102 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden")
104 INCLUDE_DIRECTORIES(SYSTEM
105 ${KEY_MANAGER_DEP_INCLUDE_DIRS}
109 ${KEY_MANAGER_SRC_PATH}/include
110 ${KEY_MANAGER_PATH}/main
111 ${KEY_MANAGER_PATH}/common
112 ${KEY_MANAGER_PATH}/service
113 ${KEY_MANAGER_PATH}/initial-values
114 ${KEY_MANAGER_PATH}/sqlcipher
115 ${KEY_MANAGER_PATH}/dpl/core/include
116 ${KEY_MANAGER_PATH}/dpl/log/include
117 ${KEY_MANAGER_PATH}/dpl/db/include
118 ${KEY_MANAGER_PATH}/crypto
121 LINK_DIRECTORIES(${KEY_MANAGER_DEP_LIBRARY_DIRS})
123 ADD_EXECUTABLE(${TARGET_KEY_MANAGER} ${KEY_MANAGER_SOURCES})
125 IF(TZ_BACKEND_ENABLED)
126 SET(KM_LINK_EXTRA_DEPS
127 ${KM_LINK_EXTRA_DEPS}
132 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER}
133 ${CMAKE_THREAD_LIBS_INIT}
134 ${KEY_MANAGER_DEP_LIBRARIES}
135 ${TARGET_KEY_MANAGER_COMMON}
136 ${KM_LINK_EXTRA_DEPS}
139 ################################################################################
141 SET(KEY_MANAGER_CLIENT_VERSION_MAJOR 1)
142 SET(KEY_MANAGER_CLIENT_VERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}.0.1)
144 SET(KEY_MANAGER_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
145 SET(KEY_MANAGER_CLIENT_ASYNC_SRC_PATH ${KEY_MANAGER_PATH}/client-async)
146 SET(KEY_MANAGER_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
149 ${KEY_MANAGER_PATH}/client
150 ${KEY_MANAGER_PATH}/client-async
151 ${KEY_MANAGER_PATH}/client-capi
152 ${KEY_MANAGER_PATH}/common
153 ${KEY_MANAGER_PATH}/dpl/core/include
154 ${KEY_MANAGER_PATH}/dpl/log/include
157 SET(KEY_MANAGER_CLIENT_SOURCES
158 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-common.cpp
159 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager.cpp
160 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager-impl.cpp
161 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/client-manager-async.cpp
162 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/client-manager-async-impl.cpp
163 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/connection-thread.cpp
164 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/async-request.cpp
165 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/service.cpp
166 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/storage-receiver.cpp
167 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/ocsp-receiver.cpp
168 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/encryption-receiver.cpp
169 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/descriptor-set.cpp
170 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type.cpp
171 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-manager.cpp
172 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type-converter.cpp
175 ADD_LIBRARY(${TARGET_KEY_MANAGER_CLIENT} SHARED ${KEY_MANAGER_CLIENT_SOURCES})
177 SET_TARGET_PROPERTIES(
178 ${TARGET_KEY_MANAGER_CLIENT}
180 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wno-deprecated-declarations"
181 SOVERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}
182 VERSION ${KEY_MANAGER_CLIENT_VERSION}
185 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CLIENT}
186 ${KEY_MANAGER_DEP_LIBRARIES}
187 ${TARGET_KEY_MANAGER_COMMON}
190 ################################################################################
192 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR 1)
193 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}.0.1)
195 SET(KEY_MANAGER_CONTROL_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
196 SET(KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
199 ${KEY_MANAGER_PATH}/client
200 ${KEY_MANAGER_PATH}/client-capi
201 ${KEY_MANAGER_PATH}/common
202 ${KEY_MANAGER_PATH}/dpl/core/include
203 ${KEY_MANAGER_PATH}/dpl/log/include
206 SET(KEY_MANAGER_CONTROL_CLIENT_SOURCES
207 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-control.cpp
208 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-common.cpp
209 ${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-control.cpp
210 ${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-type-converter.cpp
213 ADD_LIBRARY(${TARGET_KEY_MANAGER_CONTROL_CLIENT} SHARED ${KEY_MANAGER_CONTROL_CLIENT_SOURCES})
215 SET_TARGET_PROPERTIES(
216 ${TARGET_KEY_MANAGER_CONTROL_CLIENT}
218 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wno-deprecated-declarations"
219 SOVERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}
220 VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION}
223 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CONTROL_CLIENT}
224 ${KEY_MANAGER_DEP_LIBRARIES}
225 ${TARGET_KEY_MANAGER_COMMON}
228 ################################################################################
229 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
230 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CONTROL_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
232 INSTALL(TARGETS ${TARGET_KEY_MANAGER} DESTINATION ${BIN_DIR})
236 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager.h
237 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager-async.h
238 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-certificate.h
239 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-control.h
240 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-error.h
241 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-key.h
242 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-password.h
243 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-pkcs12.h
244 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-raw-buffer.h
245 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-type.h
246 DESTINATION /usr/include/ckm/ckm
249 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-manager.h
250 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-control.h
251 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-error.h
252 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-type.h
253 DESTINATION /usr/include/ckm/ckmc
255 ################################################################################
257 ADD_SUBDIRECTORY(manager)
258 ADD_SUBDIRECTORY(pam_plugin)