- env: OPENSSL_BRANCH=master
os: linux
compiler: gcc
+ - env:
+ - OPENSSL_BRANCH=master
+ - ASAN=-DASAN=1
+ os: linux
+ compiler: gcc
# - env: OPENSSL_BRANCH=OpenSSL_1_1_0-stable
# os: linux
# compiler: gcc
before_script:
- git clone --depth 1 -b ${OPENSSL_BRANCH} https://github.com/openssl/openssl.git
- cd openssl
- - ./config shared --prefix=${PREFIX} --openssldir=${PREFIX} && make -j$(nproc) all && make install_sw > build.log 2>&1 || (cat build.log && exit 1)
+ - ./config shared -d --prefix=${PREFIX} --openssldir=${PREFIX} && make -j$(nproc) all && make install_sw > build.log 2>&1 || (cat build.log && exit 1)
- cd ..
script:
- mkdir build
- cd build
- - cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib -DOPENSSL_ENGINES_DIR=${PREFIX}/engines ..
+ - cmake -DOPENSSL_ROOT_DIR=${PREFIX} -DOPENSSL_LIBRARIES=${PREFIX}/lib -DOPENSSL_ENGINES_DIR=${PREFIX}/engines ${ASAN} ..
- make
- make test CTEST_OUTPUT_ON_FAILURE=1
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)
include (TestBigEndian)
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})