diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2935a82..b0d5ea0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -194,6 +194,14 @@ add_executable(mont mont.c) target_link_libraries(mont ${OPENSSL_LIBS}) add_test(mont mont) +# ocsp_test +if(ENABLE_EXTRATESTS) + add_executable(ocsp_test ocsp_test.c) + target_link_libraries(ocsp_test ${OPENSSL_LIBS}) + add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) + set_tests_properties(ocsptest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}") +endif() + # optionstest add_executable(optionstest optionstest.c) target_link_libraries(optionstest ${OPENSSL_LIBS}) diff --git a/tests/Makefile.am b/tests/Makefile.am index 3a6edfe..1607988 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -208,6 +208,14 @@ TESTS += mont check_PROGRAMS += mont mont_SOURCES = mont.c +# ocsp_test +if ENABLE_EXTRATESTS +TESTS += ocsptest.sh +check_PROGRAMS += ocsp_test +ocsp_test_SOURCES = ocsp_test.c +EXTRA_DIST += ocsptest.sh +endif + # optionstest TESTS += optionstest check_PROGRAMS += optionstest diff --git a/tests/ocsptest.sh b/tests/ocsptest.sh new file mode 100755 index 0000000..a1c266d --- /dev/null +++ b/tests/ocsptest.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e +TEST=./ocsp_test +if [ -e ./ocsp_test.exe ]; then + TEST=./ocsp_test.exe +fi +$TEST www.amazon.com 443 +$TEST cloudflare.com 443