2015-07-22 05:21:14 +02:00
|
|
|
include_directories(
|
|
|
|
.
|
|
|
|
../include
|
|
|
|
../include/compat
|
|
|
|
../crypto/modes
|
|
|
|
../crypto/asn1
|
|
|
|
../ssl
|
2015-09-12 15:07:58 +02:00
|
|
|
../apps/openssl
|
|
|
|
../apps/openssl/compat
|
2015-07-22 05:21:14 +02:00
|
|
|
)
|
|
|
|
|
2016-08-12 09:27:18 +02:00
|
|
|
add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../apps/openssl/cert.pem\")
|
|
|
|
|
2016-11-06 13:56:25 +01:00
|
|
|
foreach(lib IN LISTS OPENSSL_LIBS)
|
2017-01-13 16:10:59 +01:00
|
|
|
if(${lib} STREQUAL "tls-shared")
|
|
|
|
set(TESTS_LIBS ${TESTS_LIBS} tls)
|
|
|
|
elseif(${lib} STREQUAL "ssl-shared")
|
2016-11-06 13:56:25 +01:00
|
|
|
set(TESTS_LIBS ${TESTS_LIBS} ssl)
|
2016-11-06 16:07:51 +01:00
|
|
|
elseif(${lib} STREQUAL "crypto-shared")
|
|
|
|
set(TESTS_LIBS ${TESTS_LIBS} crypto)
|
2016-11-06 13:56:25 +01:00
|
|
|
else()
|
|
|
|
set(TESTS_LIBS ${TESTS_LIBS} ${lib})
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# aeadtest
|
2016-04-05 03:02:35 +02:00
|
|
|
add_executable(aeadtest aeadtest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(aeadtest ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
add_test(aeadtest aeadtest ${CMAKE_CURRENT_SOURCE_DIR}/aeadtests.txt)
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# aes_wrap
|
|
|
|
add_executable(aes_wrap aes_wrap.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(aes_wrap ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(aes_wrap aes_wrap)
|
|
|
|
|
|
|
|
# arc4randomforktest
|
|
|
|
# Windows/mingw does not have fork, but Cygwin does.
|
2016-04-11 05:59:23 +02:00
|
|
|
if(NOT CMAKE_HOST_WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES "MINGW")
|
2016-10-18 10:13:56 +02:00
|
|
|
add_executable(arc4randomforktest arc4randomforktest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(arc4randomforktest ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
add_test(arc4randomforktest ${CMAKE_CURRENT_SOURCE_DIR}/arc4randomforktest.sh)
|
2015-07-22 05:21:14 +02:00
|
|
|
endif()
|
|
|
|
|
2017-12-22 15:32:22 +01:00
|
|
|
# asn1evp
|
|
|
|
add_executable(asn1evp asn1evp.c)
|
|
|
|
target_link_libraries(asn1evp ${TESTS_LIBS})
|
|
|
|
add_test(asn1evp asn1evp)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# asn1test
|
|
|
|
add_executable(asn1test asn1test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(asn1test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(asn1test asn1test)
|
|
|
|
|
2015-09-29 00:49:46 +02:00
|
|
|
# asn1time
|
|
|
|
add_executable(asn1time asn1time.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(asn1time ${TESTS_LIBS})
|
2015-09-29 00:49:46 +02:00
|
|
|
add_test(asn1time asn1time)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# base64test
|
|
|
|
add_executable(base64test base64test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(base64test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(base64test base64test)
|
|
|
|
|
|
|
|
# bftest
|
|
|
|
add_executable(bftest bftest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(bftest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(bftest bftest)
|
|
|
|
|
2016-04-11 05:59:23 +02:00
|
|
|
# biotest
|
|
|
|
# the BIO tests rely on resolver results that are OS and environment-specific
|
|
|
|
if(ENABLE_EXTRATESTS)
|
|
|
|
add_executable(biotest biotest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(biotest ${TESTS_LIBS})
|
2016-04-11 05:59:23 +02:00
|
|
|
add_test(biotest biotest)
|
|
|
|
endif()
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# bntest
|
|
|
|
add_executable(bntest bntest.c)
|
2017-01-23 02:55:54 +01:00
|
|
|
set_source_files_properties(bntest.c PROPERTIES COMPILE_FLAGS -ULIBRESSL_INTERNAL)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(bntest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(bntest bntest)
|
|
|
|
|
|
|
|
# bytestringtest
|
|
|
|
add_executable(bytestringtest bytestringtest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(bytestringtest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(bytestringtest bytestringtest)
|
|
|
|
|
|
|
|
# casttest
|
|
|
|
add_executable(casttest casttest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(casttest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(casttest casttest)
|
|
|
|
|
|
|
|
# chachatest
|
|
|
|
add_executable(chachatest chachatest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(chachatest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(chachatest chachatest)
|
|
|
|
|
|
|
|
# cipher_list
|
|
|
|
add_executable(cipher_list cipher_list.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(cipher_list ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(cipher_list cipher_list)
|
|
|
|
|
|
|
|
# cipherstest
|
|
|
|
add_executable(cipherstest cipherstest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(cipherstest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(cipherstest cipherstest)
|
|
|
|
|
2015-09-12 15:07:58 +02:00
|
|
|
# clienttest
|
|
|
|
add_executable(clienttest clienttest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(clienttest ${TESTS_LIBS})
|
2015-09-12 15:07:58 +02:00
|
|
|
add_test(clienttest clienttest)
|
|
|
|
|
2017-12-22 15:35:48 +01:00
|
|
|
# configtest
|
|
|
|
add_executable(configtest configtest.c)
|
|
|
|
target_link_libraries(configtest ${TESTS_LIBS})
|
|
|
|
add_test(configtest configtest)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# cts128test
|
|
|
|
add_executable(cts128test cts128test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(cts128test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(cts128test cts128test)
|
|
|
|
|
|
|
|
# destest
|
|
|
|
add_executable(destest destest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(destest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(destest destest)
|
|
|
|
|
|
|
|
# dhtest
|
|
|
|
add_executable(dhtest dhtest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(dhtest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(dhtest dhtest)
|
|
|
|
|
|
|
|
# dsatest
|
|
|
|
add_executable(dsatest dsatest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(dsatest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(dsatest dsatest)
|
|
|
|
|
|
|
|
# ecdhtest
|
|
|
|
add_executable(ecdhtest ecdhtest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(ecdhtest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(ecdhtest ecdhtest)
|
|
|
|
|
|
|
|
# ecdsatest
|
|
|
|
add_executable(ecdsatest ecdsatest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(ecdsatest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(ecdsatest ecdsatest)
|
|
|
|
|
|
|
|
# ectest
|
|
|
|
add_executable(ectest ectest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(ectest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(ectest ectest)
|
|
|
|
|
|
|
|
# enginetest
|
|
|
|
add_executable(enginetest enginetest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(enginetest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(enginetest enginetest)
|
|
|
|
|
|
|
|
# evptest
|
2016-04-05 03:02:35 +02:00
|
|
|
add_executable(evptest evptest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(evptest ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
add_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt)
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# explicit_bzero
|
|
|
|
# explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows
|
|
|
|
if(NOT CMAKE_HOST_WIN32)
|
2016-10-18 10:13:56 +02:00
|
|
|
if(HAVE_MEMMEM)
|
|
|
|
add_executable(explicit_bzero explicit_bzero.c)
|
|
|
|
else()
|
2017-01-27 19:40:38 +01:00
|
|
|
add_executable(explicit_bzero explicit_bzero.c compat/memmem.c)
|
2016-10-18 10:13:56 +02:00
|
|
|
endif()
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(explicit_bzero ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
add_test(explicit_bzero explicit_bzero)
|
2015-07-22 05:21:14 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# exptest
|
|
|
|
add_executable(exptest exptest.c)
|
2017-01-23 02:55:54 +01:00
|
|
|
set_source_files_properties(exptest.c PROPERTIES COMPILE_FLAGS -ULIBRESSL_INTERNAL)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(exptest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(exptest exptest)
|
|
|
|
|
2017-07-10 15:35:09 +02:00
|
|
|
# freenull
|
|
|
|
add_executable(freenull freenull.c)
|
|
|
|
target_link_libraries(freenull ${TESTS_LIBS})
|
|
|
|
add_test(freenull freenull)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# gcm128test
|
|
|
|
add_executable(gcm128test gcm128test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(gcm128test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(gcm128test gcm128test)
|
|
|
|
|
|
|
|
# gost2814789t
|
|
|
|
add_executable(gost2814789t gost2814789t.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(gost2814789t ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(gost2814789t gost2814789t)
|
|
|
|
|
2017-05-01 17:21:57 +02:00
|
|
|
# hkdf_test
|
|
|
|
add_executable(hkdf_test hkdf_test.c)
|
|
|
|
target_link_libraries(hkdf_test ${TESTS_LIBS})
|
|
|
|
add_test(hkdf_test hkdf_test)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# hmactest
|
|
|
|
add_executable(hmactest hmactest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(hmactest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(hmactest hmactest)
|
|
|
|
|
|
|
|
# ideatest
|
|
|
|
add_executable(ideatest ideatest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(ideatest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(ideatest ideatest)
|
|
|
|
|
|
|
|
# igetest
|
|
|
|
add_executable(igetest igetest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(igetest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(igetest igetest)
|
|
|
|
|
|
|
|
# md4test
|
|
|
|
add_executable(md4test md4test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(md4test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(md4test md4test)
|
|
|
|
|
|
|
|
# md5test
|
|
|
|
add_executable(md5test md5test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(md5test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(md5test md5test)
|
|
|
|
|
|
|
|
# mont
|
|
|
|
add_executable(mont mont.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(mont ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(mont mont)
|
|
|
|
|
2016-07-05 06:29:39 +02:00
|
|
|
# ocsp_test
|
|
|
|
if(ENABLE_EXTRATESTS)
|
|
|
|
add_executable(ocsp_test ocsp_test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(ocsp_test ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh)
|
|
|
|
else()
|
|
|
|
add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.bat)
|
|
|
|
endif()
|
2016-07-05 06:29:39 +02:00
|
|
|
endif()
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# optionstest
|
|
|
|
add_executable(optionstest optionstest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(optionstest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(optionstest optionstest)
|
|
|
|
|
|
|
|
# pbkdf2
|
|
|
|
add_executable(pbkdf2 pbkdf2.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(pbkdf2 ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(pbkdf2 pbkdf2)
|
|
|
|
|
2016-04-11 05:59:23 +02:00
|
|
|
# pidwraptest
|
|
|
|
# pidwraptest relies on an OS-specific way to give out pids and is generally
|
|
|
|
# awkward on systems with slow fork
|
2016-10-18 10:13:56 +02:00
|
|
|
if(ENABLE_EXTRATESTS AND NOT MSVC)
|
2016-04-11 05:59:23 +02:00
|
|
|
add_executable(pidwraptest pidwraptest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(pidwraptest ${TESTS_LIBS})
|
2016-04-11 05:59:23 +02:00
|
|
|
add_test(pidwraptest ${CMAKE_CURRENT_SOURCE_DIR}/pidwraptest.sh)
|
|
|
|
endif()
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# pkcs7test
|
|
|
|
add_executable(pkcs7test pkcs7test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(pkcs7test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(pkcs7test pkcs7test)
|
|
|
|
|
|
|
|
# poly1305test
|
|
|
|
add_executable(poly1305test poly1305test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(poly1305test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(poly1305test poly1305test)
|
|
|
|
|
|
|
|
# pq_test
|
2016-04-05 03:02:35 +02:00
|
|
|
add_executable(pq_test pq_test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(pq_test ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(pq_test ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh)
|
|
|
|
else()
|
|
|
|
add_test(pq_test ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.bat)
|
|
|
|
endif()
|
2016-04-05 03:02:35 +02:00
|
|
|
set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# randtest
|
|
|
|
add_executable(randtest randtest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(randtest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(randtest randtest)
|
|
|
|
|
|
|
|
# rc2test
|
|
|
|
add_executable(rc2test rc2test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(rc2test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(rc2test rc2test)
|
|
|
|
|
|
|
|
# rc4test
|
|
|
|
add_executable(rc4test rc4test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(rc4test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(rc4test rc4test)
|
|
|
|
|
2015-10-06 13:18:15 +02:00
|
|
|
# rfc5280time
|
|
|
|
add_executable(rfc5280time rfc5280time.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(rfc5280time ${TESTS_LIBS})
|
2016-04-04 04:28:46 +02:00
|
|
|
if(SMALL_TIME_T)
|
|
|
|
add_test(rfc5280time ${CMAKE_CURRENT_SOURCE_DIR}/rfc5280time_small.test)
|
|
|
|
else()
|
|
|
|
add_test(rfc5280time rfc5280time)
|
|
|
|
endif()
|
2015-10-06 13:18:15 +02:00
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# rmdtest
|
|
|
|
add_executable(rmdtest rmdtest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(rmdtest ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(rmdtest rmdtest)
|
|
|
|
|
2017-01-25 11:39:03 +01:00
|
|
|
# rsa_test
|
|
|
|
add_executable(rsa_test rsa_test.c)
|
|
|
|
target_link_libraries(rsa_test ${TESTS_LIBS})
|
|
|
|
add_test(rsa_test rsa_test)
|
|
|
|
|
2017-03-11 14:27:09 +01:00
|
|
|
# servertest
|
|
|
|
add_executable(servertest servertest.c)
|
|
|
|
target_link_libraries(servertest ${TESTS_LIBS})
|
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(servertest ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh)
|
|
|
|
else()
|
|
|
|
add_test(servertest ${CMAKE_CURRENT_SOURCE_DIR}/servertest.bat)
|
|
|
|
endif()
|
|
|
|
set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# sha1test
|
|
|
|
add_executable(sha1test sha1test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(sha1test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(sha1test sha1test)
|
|
|
|
|
|
|
|
# sha256test
|
|
|
|
add_executable(sha256test sha256test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(sha256test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(sha256test sha256test)
|
|
|
|
|
|
|
|
# sha512test
|
|
|
|
add_executable(sha512test sha512test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(sha512test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(sha512test sha512test)
|
|
|
|
|
2017-01-06 01:05:59 +01:00
|
|
|
# ssl_versions
|
|
|
|
add_executable(ssl_versions ssl_versions.c)
|
|
|
|
target_link_libraries(ssl_versions ${TESTS_LIBS})
|
|
|
|
add_test(ssl_versions ssl_versions)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# ssltest
|
2016-04-05 03:02:35 +02:00
|
|
|
add_executable(ssltest ssltest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(ssltest ${TESTS_LIBS})
|
2016-10-18 10:13:56 +02:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(ssltest ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh)
|
|
|
|
else()
|
|
|
|
add_test(ssltest ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.bat)
|
|
|
|
endif()
|
2016-04-05 03:02:35 +02:00
|
|
|
set_tests_properties(ssltest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# testdsa
|
2016-10-18 10:13:56 +02:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(testdsa ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh)
|
|
|
|
else()
|
|
|
|
add_test(testdsa ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.bat)
|
|
|
|
endif()
|
2016-04-05 03:02:35 +02:00
|
|
|
set_tests_properties(testdsa PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# testenc
|
2016-10-18 10:13:56 +02:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(testenc ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh)
|
|
|
|
else()
|
|
|
|
add_test(testenc ${CMAKE_CURRENT_SOURCE_DIR}/testenc.bat)
|
|
|
|
endif()
|
2016-04-05 03:02:35 +02:00
|
|
|
set_tests_properties(testenc PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# testrsa
|
2016-10-18 10:13:56 +02:00
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(testrsa ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh)
|
|
|
|
else()
|
|
|
|
add_test(testrsa ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.bat)
|
|
|
|
endif()
|
2016-04-05 03:02:35 +02:00
|
|
|
set_tests_properties(testrsa PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
2015-07-22 05:21:14 +02:00
|
|
|
|
|
|
|
# timingsafe
|
|
|
|
add_executable(timingsafe timingsafe.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(timingsafe ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(timingsafe timingsafe)
|
|
|
|
|
2017-07-17 12:12:55 +02:00
|
|
|
# tlsexttest
|
|
|
|
add_executable(tlsexttest tlsexttest.c)
|
|
|
|
target_link_libraries(tlsexttest ${TESTS_LIBS})
|
|
|
|
add_test(tlsexttest tlsexttest)
|
|
|
|
|
2017-01-13 16:10:59 +01:00
|
|
|
# tlstest
|
2017-01-15 11:30:41 +01:00
|
|
|
set(TLSTEST_SRC tlstest.c)
|
|
|
|
check_function_exists(pipe2 HAVE_PIPE2)
|
|
|
|
if(HAVE_PIPE2)
|
|
|
|
add_definitions(-DHAVE_PIPE2)
|
|
|
|
else()
|
|
|
|
set(TLSTEST_SRC ${TLSTEST_SRC} compat/pipe2.c)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(tlstest ${TLSTEST_SRC})
|
2017-01-13 16:10:59 +01:00
|
|
|
target_link_libraries(tlstest ${TESTS_LIBS})
|
|
|
|
if(NOT MSVC)
|
|
|
|
add_test(tlstest ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh)
|
|
|
|
else()
|
|
|
|
add_test(tlstest ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.bat)
|
|
|
|
endif()
|
|
|
|
set_tests_properties(tlstest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
|
2016-08-29 17:57:10 +02:00
|
|
|
# tls_ext_alpn
|
|
|
|
add_executable(tls_ext_alpn tls_ext_alpn.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(tls_ext_alpn ${TESTS_LIBS})
|
2016-08-29 17:57:10 +02:00
|
|
|
add_test(tls_ext_alpn tls_ext_alpn)
|
|
|
|
|
2017-03-11 14:28:24 +01:00
|
|
|
# tls_prf
|
|
|
|
add_executable(tls_prf tls_prf.c)
|
|
|
|
target_link_libraries(tls_prf ${TESTS_LIBS})
|
|
|
|
add_test(tls_prf tls_prf)
|
|
|
|
|
2015-07-22 05:21:14 +02:00
|
|
|
# utf8test
|
|
|
|
add_executable(utf8test utf8test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(utf8test ${TESTS_LIBS})
|
2015-07-22 05:21:14 +02:00
|
|
|
add_test(utf8test utf8test)
|
2015-09-12 15:07:58 +02:00
|
|
|
|
|
|
|
# verifytest
|
|
|
|
add_executable(verifytest verifytest.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(verifytest tls ${TESTS_LIBS})
|
2015-09-12 15:07:58 +02:00
|
|
|
add_test(verifytest verifytest)
|
2016-11-05 20:57:23 +01:00
|
|
|
|
|
|
|
# x25519test
|
|
|
|
add_executable(x25519test x25519test.c)
|
2016-11-06 13:56:25 +01:00
|
|
|
target_link_libraries(x25519test ${TESTS_LIBS})
|
2016-11-05 20:57:23 +01:00
|
|
|
add_test(x25519test x25519test)
|
2016-11-06 13:56:25 +01:00
|
|
|
|
|
|
|
if(ENABLE_VSTEST AND USE_SHARED)
|
|
|
|
add_custom_command(TARGET x25519test POST_BUILD
|
|
|
|
COMMAND "${CMAKE_COMMAND}" -E copy
|
2017-01-13 16:10:59 +01:00
|
|
|
"$<TARGET_FILE:tls-shared>"
|
2016-11-06 13:56:25 +01:00
|
|
|
"$<TARGET_FILE:ssl-shared>"
|
|
|
|
"$<TARGET_FILE:crypto-shared>"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}"
|
|
|
|
COMMENT "Copying DLLs for regression tests")
|
|
|
|
endif()
|
|
|
|
|