@@ -80,9 +80,6 @@ endif()
80
80
81
81
set (BIN_DIRECTORY bin)
82
82
83
- # Same soversion as OpenSSL
84
- set (GOST_SOVERSION "${OPENSSL_VERSION_MAJOR} .${OPENSSL_VERSION_MINOR} " )
85
-
86
83
set (OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} /${BIN_DIRECTORY} )
87
84
88
85
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY})
@@ -134,12 +131,18 @@ set(GOST_GRASSHOPPER_SOURCE_FILES
134
131
set (GOST_CORE_SOURCE_FILES
135
132
e_gost_err.c
136
133
e_gost_err.h
134
+ gost_ameth.c
135
+ gost_pmeth.c
136
+ gost_ctl.c
137
137
gost_asn1.c
138
138
gost_crypt.c
139
- gost_ctl.c
140
- gost_eng.c
141
139
gost_keywrap.c
142
140
gost_keywrap.h
141
+ gost_md.c
142
+ gost_md2012.c
143
+ gost_omac.c
144
+ gost_omac_acpkm.c
145
+ gost_gost2015.c
143
146
gost_lcl.h
144
147
gost_params.c
145
148
gost_keyexpimp.c
@@ -164,6 +167,7 @@ set (GOST_OMAC_SOURCE_FILES
164
167
)
165
168
166
169
set (GOST_LIB_SOURCE_FILES
170
+ ${GOST_CORE_SOURCE_FILES}
167
171
${GOST_89_SOURCE_FILES}
168
172
${GOST_HASH_SOURCE_FILES}
169
173
${GOST_HASH_2012_SOURCE_FILES}
@@ -173,64 +177,57 @@ set(GOST_LIB_SOURCE_FILES
173
177
)
174
178
175
179
set (GOST_ENGINE_SOURCE_FILES
176
- ${GOST_CORE_SOURCE_FILES}
177
- gost_ameth.c
178
- gost_md.c
179
- gost_md2012.c
180
- gost_pmeth.c
181
- gost_omac.c
182
- gost_omac_acpkm.c
183
- gost_gost2015.c
180
+ gost_eng.c
184
181
)
185
182
186
183
add_executable (test_digest test_digest.c)
187
- target_link_libraries (test_digest gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
184
+ target_link_libraries (test_digest gost_core ${OPENSSL_CRYPTO_LIBRARY} )
188
185
add_test (NAME digest
189
186
COMMAND test_digest)
190
187
191
188
add_executable (test_ciphers test_ciphers.c)
192
- target_link_libraries (test_ciphers gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
189
+ target_link_libraries (test_ciphers gost_core ${OPENSSL_CRYPTO_LIBRARY} )
193
190
add_test (NAME ciphers
194
191
COMMAND test_ciphers)
195
192
196
193
add_executable (test_curves test_curves.c)
197
- target_link_libraries (test_curves gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
194
+ target_link_libraries (test_curves gost_core ${OPENSSL_CRYPTO_LIBRARY} )
198
195
add_test (NAME curves
199
196
COMMAND test_curves)
200
197
201
198
add_executable (test_params test_params.c)
202
- target_link_libraries (test_params gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
199
+ target_link_libraries (test_params gost_core ${OPENSSL_CRYPTO_LIBRARY} )
203
200
add_test (NAME parameters
204
201
COMMAND test_params)
205
202
206
203
add_executable (test_derive test_derive.c)
207
- target_link_libraries (test_derive gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
204
+ target_link_libraries (test_derive gost_core ${OPENSSL_CRYPTO_LIBRARY} )
208
205
add_test (NAME derive
209
206
COMMAND test_derive)
210
207
211
208
add_executable (test_sign test_sign.c)
212
- target_link_libraries (test_sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
209
+ target_link_libraries (test_sign gost_core ${OPENSSL_CRYPTO_LIBRARY} )
213
210
add_test (NAME sign/verify
214
211
COMMAND test_sign)
215
212
216
213
add_executable (test_tls test_tls.c)
217
- target_link_libraries (test_tls gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} )
214
+ target_link_libraries (test_tls gost_core ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} )
218
215
add_test (NAME TLS
219
216
COMMAND test_tls)
220
217
221
218
add_executable (test_context test_context.c)
222
- target_link_libraries (test_context gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
219
+ target_link_libraries (test_context gost_core ${OPENSSL_CRYPTO_LIBRARY} )
223
220
add_test (NAME context
224
221
COMMAND test_context)
225
222
226
223
add_executable (test_keyexpimp test_keyexpimp.c)
227
224
#target_compile_definitions(test_keyexpimp PUBLIC -DOPENSSL_LOAD_CONF)
228
- target_link_libraries (test_keyexpimp gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
225
+ target_link_libraries (test_keyexpimp gost_core ${OPENSSL_CRYPTO_LIBRARY} )
229
226
add_test (NAME keyexpimp
230
227
COMMAND test_keyexpimp)
231
228
232
229
add_executable (test_gost89 test_gost89.c)
233
- target_link_libraries (test_gost89 gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
230
+ target_link_libraries (test_gost89 gost_core ${OPENSSL_CRYPTO_LIBRARY} )
234
231
add_test (NAME gost89
235
232
COMMAND test_gost89)
236
233
@@ -249,7 +246,7 @@ if(NOT SKIP_PERL_TESTS)
249
246
endif ()
250
247
251
248
add_executable (sign benchmark/sign.c)
252
- target_link_libraries (sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} ${CLOCK_GETTIME_LIB} )
249
+ target_link_libraries (sign gost_core ${OPENSSL_CRYPTO_LIBRARY} ${CLOCK_GETTIME_LIB} )
253
250
254
251
# All that may need to load just built engine will have path to it defined.
255
252
set (BINARY_TESTS_TARGETS
@@ -269,9 +266,8 @@ set_property(TARGET ${BINARY_TESTS_TARGETS} APPEND PROPERTY COMPILE_DEFINITIONS
269
266
add_library (gost_core STATIC ${GOST_LIB_SOURCE_FILES} )
270
267
set_target_properties (gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON )
271
268
272
- add_library (gost_engine SHARED ${GOST_ENGINE_SOURCE_FILES} )
269
+ add_library (gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES} )
273
270
set_target_properties (gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "gost" )
274
- set_target_properties (gost_engine PROPERTIES VERSION ${GOST_SOVERSION} SOVERSION ${GOST_SOVERSION} )
275
271
target_link_libraries (gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} )
276
272
277
273
set (GOST_SUM_SOURCE_FILES
0 commit comments