diff options
| author | Brent Cook <bcook@openbsd.org> | 2016-07-04 23:29:39 -0500 |
|---|---|---|
| committer | Brent Cook <bcook@openbsd.org> | 2016-07-04 23:29:39 -0500 |
| commit | aab671088d5a484c2d1f804a7a744fce96d8188f (patch) | |
| tree | 22e0928c619449b198041a07c579ce95a912265a | |
| parent | ccf66c469faf898161109d8277d669e4841df319 (diff) | |
| download | portable-aab671088d5a484c2d1f804a7a744fce96d8188f.tar.gz portable-aab671088d5a484c2d1f804a7a744fce96d8188f.tar.bz2 portable-aab671088d5a484c2d1f804a7a744fce96d8188f.zip | |
add OCSP test
| -rw-r--r-- | tests/CMakeLists.txt | 8 | ||||
| -rw-r--r-- | tests/Makefile.am | 8 | ||||
| -rwxr-xr-x | tests/ocsptest.sh | 8 |
3 files changed, 24 insertions, 0 deletions
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) | |||
| 194 | target_link_libraries(mont ${OPENSSL_LIBS}) | 194 | target_link_libraries(mont ${OPENSSL_LIBS}) |
| 195 | add_test(mont mont) | 195 | add_test(mont mont) |
| 196 | 196 | ||
| 197 | # ocsp_test | ||
| 198 | if(ENABLE_EXTRATESTS) | ||
| 199 | add_executable(ocsp_test ocsp_test.c) | ||
| 200 | target_link_libraries(ocsp_test ${OPENSSL_LIBS}) | ||
| 201 | add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) | ||
| 202 | set_tests_properties(ocsptest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}") | ||
| 203 | endif() | ||
| 204 | |||
| 197 | # optionstest | 205 | # optionstest |
| 198 | add_executable(optionstest optionstest.c) | 206 | add_executable(optionstest optionstest.c) |
| 199 | target_link_libraries(optionstest ${OPENSSL_LIBS}) | 207 | 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 | |||
| 208 | check_PROGRAMS += mont | 208 | check_PROGRAMS += mont |
| 209 | mont_SOURCES = mont.c | 209 | mont_SOURCES = mont.c |
| 210 | 210 | ||
| 211 | # ocsp_test | ||
| 212 | if ENABLE_EXTRATESTS | ||
| 213 | TESTS += ocsptest.sh | ||
| 214 | check_PROGRAMS += ocsp_test | ||
| 215 | ocsp_test_SOURCES = ocsp_test.c | ||
| 216 | EXTRA_DIST += ocsptest.sh | ||
| 217 | endif | ||
| 218 | |||
| 211 | # optionstest | 219 | # optionstest |
| 212 | TESTS += optionstest | 220 | TESTS += optionstest |
| 213 | check_PROGRAMS += optionstest | 221 | 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 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | set -e | ||
| 3 | TEST=./ocsp_test | ||
| 4 | if [ -e ./ocsp_test.exe ]; then | ||
| 5 | TEST=./ocsp_test.exe | ||
| 6 | fi | ||
| 7 | $TEST www.amazon.com 443 | ||
| 8 | $TEST cloudflare.com 443 | ||
