]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - CMakeLists.txt
Add basic tests for curves parameters
[openssl-gost/engine.git] / CMakeLists.txt
index 24377523a1a9d8c24c4273fb3e52100b0bb2cb12..774a1a7c2ae225b5ff4e878908f84c38f3306848 100644 (file)
@@ -5,7 +5,7 @@ include(GNUInstallDirs)
 
 enable_testing()
 
-find_package(OpenSSL 1.0.2 REQUIRED)
+find_package(OpenSSL 1.1.1 REQUIRED)
 include_directories(${OPENSSL_INCLUDE_DIR})
 
 if (CMAKE_C_COMPILER_ID MATCHES "Clang")
@@ -68,8 +68,6 @@ set(GOST_GRASSHOPPER_SOURCE_FILES
         gost_grasshopper_precompiled.c
         gost_grasshopper_cipher.h
         gost_grasshopper_cipher.c
-        gost_grasshopper_mac.h
-        gost_grasshopper_mac.c
         )
 
 set(GOST_CORE_SOURCE_FILES
@@ -83,6 +81,7 @@ set(GOST_CORE_SOURCE_FILES
         gost_keywrap.h
         gost_lcl.h
         gost_params.c
+        gost_keyexpimp.c
         )
 
 set(GOST_EC_SOURCE_FILES
@@ -92,6 +91,7 @@ set(GOST_EC_SOURCE_FILES
 
 set (GOST_OMAC_SOURCE_FILES
         gost_omac.c
+        gost_omac_acpkm.c
         )
 
 set(GOST_LIB_SOURCE_FILES
@@ -110,8 +110,19 @@ set(GOST_ENGINE_SOURCE_FILES
         gost_md2012.c
         gost_pmeth.c
         gost_omac.c
+        gost_omac_acpkm.c
         )
 
+add_executable(test_curves test_curves.c)
+target_link_libraries(test_curves gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
+add_test(NAME curves
+       COMMAND test_curves)
+
+add_executable(test_context test_context.c)
+target_link_libraries(test_context gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
+add_test(NAME context
+       COMMAND test_context)
+
 add_executable(test_grasshopper test_grasshopper.c)
 target_link_libraries(test_grasshopper gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
 add_test(NAME grasshopper
@@ -125,7 +136,7 @@ add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES})
 set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
 
 add_library(gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES})
-set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "libgost")
+set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "gost")
 target_link_libraries(gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
 
 set(GOST_SUM_SOURCE_FILES
@@ -142,6 +153,11 @@ set(GOST_12_SUM_SOURCE_FILES
 add_executable(gost12sum ${GOST_12_SUM_SOURCE_FILES})
 target_link_libraries(gost12sum gost_core)
 
+add_executable(unit_expimp gost_keyexpimp.c e_gost_err.c)
+target_compile_definitions(unit_expimp PUBLIC -DENABLE_UNIT_TESTS)
+target_compile_definitions(unit_expimp PUBLIC -DOPENSSL_LOAD_CONF)
+target_link_libraries(unit_expimp PUBLIC ${OPENSSL_CRYPTO_LIBRARY})
+
 set_source_files_properties(tags PROPERTIES GENERATED true)
 add_custom_target(tags
     COMMAND ctags -R . ${OPENSSL_ROOT_DIR}