X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=c81c55b8a86fa27bd0680950aaa4612ae8a9acb1;hb=eea06158911bb530156ff6e54ec26dcd471e977e;hp=408da4d00b93d576d75d22f7d6786baf3e5344e2;hpb=6d7502c539c8c5f0637c9db2f0da8410cfa2e300;p=openssl-gost%2Fengine.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 408da4d..c81c55b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,13 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") add_compile_options(/MP /WX /W4 /wd4100 /wd4267 /wd4206 /wd4706 /wd4244 /wd4115) endif() +if (ASAN) + message(STATUS "address sanitizer enabled") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -g3 -fno-omit-frame-pointer") +endif() + set(CMAKE_C_STANDARD 90) +list(APPEND CMAKE_REQUIRED_LIBRARIES rt) include (TestBigEndian) TEST_BIG_ENDIAN(IS_BIG_ENDIAN) @@ -123,15 +129,20 @@ set(GOST_ENGINE_SOURCE_FILES 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_params test_params.c) target_link_libraries(test_params gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) add_test(NAME parameters COMMAND test_params) -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_sign test_sign.c) +target_link_libraries(test_sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) +add_test(NAME sign/verify + COMMAND test_sign) add_executable(test_context test_context.c) target_link_libraries(test_context gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) @@ -154,11 +165,13 @@ target_link_libraries(test_gost89 gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY add_test(NAME gost89 COMMAND test_gost89) +if(NOT ASAN) add_test(NAME engine COMMAND perl run_tests WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/test) set_tests_properties(engine PROPERTIES ENVIRONMENT "OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR};OPENSSL_ENGINES=${OUTPUT_DIRECTORY}") +endif() add_executable(sign benchmark/sign.c) target_link_libraries(sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY})