1 FIND_PACKAGE(Threads REQUIRED)
3 SET(KEY_MANAGER_SRC_PATH ${PROJECT_SOURCE_DIR}/src)
4 SET(KEY_MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)
6 SET(KEY_MANAGER_SOURCES
7 ${KEY_MANAGER_PATH}/main/cynara.cpp
8 ${KEY_MANAGER_PATH}/main/generic-socket-manager.cpp
9 ${KEY_MANAGER_PATH}/main/key-manager-main.cpp
10 ${KEY_MANAGER_PATH}/main/smack-check.cpp
11 ${KEY_MANAGER_PATH}/main/socket-2-id.cpp
12 ${KEY_MANAGER_PATH}/main/socket-manager.cpp
13 ${KEY_MANAGER_PATH}/main/thread-service.cpp
14 ${KEY_MANAGER_PATH}/service/access-control.cpp
15 ${KEY_MANAGER_PATH}/service/certificate-config.cpp
16 ${KEY_MANAGER_PATH}/service/certificate-store.cpp
17 ${KEY_MANAGER_PATH}/service/ckm-logic.cpp
18 ${KEY_MANAGER_PATH}/service/ckm-service.cpp
19 ${KEY_MANAGER_PATH}/service/crypto-logic.cpp
20 ${KEY_MANAGER_PATH}/service/db-crypto.cpp
21 ${KEY_MANAGER_PATH}/service/encryption-logic.cpp
22 ${KEY_MANAGER_PATH}/service/encryption-service.cpp
23 ${KEY_MANAGER_PATH}/service/file-lock.cpp
24 ${KEY_MANAGER_PATH}/service/file-system.cpp
25 ${KEY_MANAGER_PATH}/service/for-each-file.cpp
26 ${KEY_MANAGER_PATH}/service/glib-logic.cpp
27 ${KEY_MANAGER_PATH}/service/glib-service.cpp
28 ${KEY_MANAGER_PATH}/service/key-provider.cpp
29 ${KEY_MANAGER_PATH}/service/ocsp.cpp
30 ${KEY_MANAGER_PATH}/service/ocsp-logic.cpp
31 ${KEY_MANAGER_PATH}/service/ocsp-service.cpp
32 ${KEY_MANAGER_PATH}/service/ss-migrate.cpp
33 ${KEY_MANAGER_PATH}/service/ss-crypto.cpp
34 ${KEY_MANAGER_PATH}/service/permission.cpp
35 ${KEY_MANAGER_PATH}/initial-values/parser.cpp
36 ${KEY_MANAGER_PATH}/initial-values/BufferHandler.cpp
37 ${KEY_MANAGER_PATH}/initial-values/CertHandler.cpp
38 ${KEY_MANAGER_PATH}/initial-values/DataHandler.cpp
39 ${KEY_MANAGER_PATH}/initial-values/KeyHandler.cpp
40 ${KEY_MANAGER_PATH}/initial-values/PermissionHandler.cpp
41 ${KEY_MANAGER_PATH}/initial-values/InitialValueHandler.cpp
42 ${KEY_MANAGER_PATH}/initial-values/InitialValuesFile.cpp
43 ${KEY_MANAGER_PATH}/initial-values/NoCharactersHandler.cpp
44 ${KEY_MANAGER_PATH}/initial-values/xml-utils.cpp
45 ${KEY_MANAGER_PATH}/initial-values/initial-value-loader.cpp
46 ${KEY_MANAGER_PATH}/dpl/db/src/sql_connection.cpp
47 ${KEY_MANAGER_PATH}/dpl/db/src/naive_synchronization_object.cpp
48 ${KEY_MANAGER_PATH}/crypto/sw-backend/obj.cpp
49 ${KEY_MANAGER_PATH}/crypto/sw-backend/internals.cpp
50 ${KEY_MANAGER_PATH}/crypto/sw-backend/store.cpp
51 ${KEY_MANAGER_PATH}/crypto/platform/decider.cpp
52 ${SECURITY_MANAGER_WRAPPER_PATH}
53 ${CYNARA_WRAPPER_PATH}
57 SET_SOURCE_FILES_PROPERTIES(
58 ${KEY_MANAGER_SOURCES}
60 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden")
62 INCLUDE_DIRECTORIES(SYSTEM
63 ${KEY_MANAGER_DEP_INCLUDE_DIRS}
67 ${KEY_MANAGER_SRC_PATH}/include
68 ${PROJECT_SOURCE_DIR}/common
69 ${KEY_MANAGER_PATH}/main
70 ${KEY_MANAGER_PATH}/common
71 ${KEY_MANAGER_PATH}/service
72 ${KEY_MANAGER_PATH}/initial-values
73 ${KEY_MANAGER_PATH}/dpl/core/include
74 ${KEY_MANAGER_PATH}/dpl/log/include
75 ${KEY_MANAGER_PATH}/dpl/db/include
76 ${KEY_MANAGER_PATH}/crypto
79 LINK_DIRECTORIES(${KEY_MANAGER_DEP_LIBRARY_DIRS})
81 ADD_EXECUTABLE(${TARGET_KEY_MANAGER} ${KEY_MANAGER_SOURCES})
83 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER}
84 ${CMAKE_THREAD_LIBS_INIT}
85 ${KEY_MANAGER_DEP_LIBRARIES}
86 ${TARGET_KEY_MANAGER_COMMON}
90 ################################################################################
92 SET(KEY_MANAGER_CLIENT_VERSION_MAJOR 1)
93 SET(KEY_MANAGER_CLIENT_VERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}.0.1)
95 SET(KEY_MANAGER_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
96 SET(KEY_MANAGER_CLIENT_ASYNC_SRC_PATH ${KEY_MANAGER_PATH}/client-async)
97 SET(KEY_MANAGER_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
100 ${KEY_MANAGER_PATH}/client
101 ${KEY_MANAGER_PATH}/client-async
102 ${KEY_MANAGER_PATH}/client-capi
103 ${KEY_MANAGER_PATH}/common
104 ${KEY_MANAGER_PATH}/dpl/core/include
105 ${KEY_MANAGER_PATH}/dpl/log/include
108 SET(KEY_MANAGER_CLIENT_SOURCES
109 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-common.cpp
110 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager.cpp
111 ${KEY_MANAGER_CLIENT_SRC_PATH}/client-manager-impl.cpp
112 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/client-manager-async.cpp
113 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/client-manager-async-impl.cpp
114 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/connection-thread.cpp
115 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/async-request.cpp
116 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/service.cpp
117 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/storage-receiver.cpp
118 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/ocsp-receiver.cpp
119 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/encryption-receiver.cpp
120 ${KEY_MANAGER_CLIENT_ASYNC_SRC_PATH}/descriptor-set.cpp
121 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type.cpp
122 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-manager.cpp
123 ${KEY_MANAGER_CLIENT_CAPI_SRC_PATH}/ckmc-type-converter.cpp
126 ADD_LIBRARY(${TARGET_KEY_MANAGER_CLIENT} SHARED ${KEY_MANAGER_CLIENT_SOURCES})
128 SET_TARGET_PROPERTIES(
129 ${TARGET_KEY_MANAGER_CLIENT}
131 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wno-deprecated-declarations"
132 SOVERSION ${KEY_MANAGER_CLIENT_VERSION_MAJOR}
133 VERSION ${KEY_MANAGER_CLIENT_VERSION}
136 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CLIENT}
137 ${KEY_MANAGER_DEP_LIBRARIES}
138 ${TARGET_KEY_MANAGER_COMMON}
141 ################################################################################
143 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR 1)
144 SET(KEY_MANAGER_CONTROL_CLIENT_VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}.0.1)
146 SET(KEY_MANAGER_CONTROL_CLIENT_SRC_PATH ${KEY_MANAGER_PATH}/client)
147 SET(KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH ${KEY_MANAGER_PATH}/client-capi)
150 ${KEY_MANAGER_PATH}/client
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_CONTROL_CLIENT_SOURCES
158 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-control.cpp
159 ${KEY_MANAGER_CONTROL_CLIENT_SRC_PATH}/client-common.cpp
160 ${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-control.cpp
161 ${KEY_MANAGER_CONTROL_CLIENT_CAPI_SRC_PATH}/ckmc-type-converter.cpp
164 ADD_LIBRARY(${TARGET_KEY_MANAGER_CONTROL_CLIENT} SHARED ${KEY_MANAGER_CONTROL_CLIENT_SOURCES})
166 SET_TARGET_PROPERTIES(
167 ${TARGET_KEY_MANAGER_CONTROL_CLIENT}
169 COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden -Wno-deprecated-declarations"
170 SOVERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION_MAJOR}
171 VERSION ${KEY_MANAGER_CONTROL_CLIENT_VERSION}
174 TARGET_LINK_LIBRARIES(${TARGET_KEY_MANAGER_CONTROL_CLIENT}
175 ${KEY_MANAGER_DEP_LIBRARIES}
176 ${TARGET_KEY_MANAGER_COMMON}
179 ################################################################################
180 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
181 INSTALL(TARGETS ${TARGET_KEY_MANAGER_CONTROL_CLIENT} DESTINATION ${LIB_INSTALL_DIR})
183 INSTALL(TARGETS ${TARGET_KEY_MANAGER} DESTINATION ${BIN_DIR})
187 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager.h
188 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-manager-async.h
189 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-certificate.h
190 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-control.h
191 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-error.h
192 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-key.h
193 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-password.h
194 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-pkcs12.h
195 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-raw-buffer.h
196 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-type.h
197 ${KEY_MANAGER_SRC_PATH}/include/ckm/ckm-zero-memory.h
198 DESTINATION /usr/include/ckm/ckm
201 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-manager.h
202 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-control.h
203 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-error.h
204 ${KEY_MANAGER_SRC_PATH}/include/ckmc/ckmc-type.h
205 DESTINATION /usr/include/ckm/ckmc
207 ################################################################################
210 ${PROJECT_SOURCE_DIR}/packaging/key-manager.manifest.in
211 ${PROJECT_SOURCE_DIR}/key-manager.manifest @ONLY
214 ADD_SUBDIRECTORY(manager)
215 ADD_SUBDIRECTORY(pam_plugin)