include(GNUInstallDirs)
+enable_testing()
+
find_package(OpenSSL 1.0.2 REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
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
gost_keywrap.c
gost_keywrap.h
gost_lcl.h
+ compat.h
gost_params.c
)
gost_omac.c
)
+add_executable(test_grasshopper test_grasshopper.c)
+target_link_libraries(test_grasshopper gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
+add_test(NAME grasshopper
+ COMMAND test_grasshopper)
+
+add_test(NAME engine
+ COMMAND perl run_tests
+ WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test)
+
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 "gost")
+set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "libgost")
target_link_libraries(gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})
set(GOST_SUM_SOURCE_FILES