Set _PATH_SSL_CA_FILE to either CMAKE_INSTALL_PREFIX or OPENSSLDIR for the OCSP tests so that OCSP tests can be executed on a system without /etc/ssl/cert.pem

This commit is contained in:
Geoff Beier 2016-08-01 21:28:53 -04:00 committed by Brent Cook
parent 48ecc2d05d
commit 1d36474726

View File

@ -196,6 +196,11 @@ add_test(mont mont)
# ocsp_test
if(ENABLE_EXTRATESTS)
if(NOT "${OPENSSLDIR}" STREQUAL "")
add_definitions(-D_PATH_SSL_CA_FILE=\"${OPENSSLDIR}/cert.pem\")
else()
add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_INSTALL_PREFIX}/etc/ssl/cert.pem\")
endif()
add_executable(ocsp_test ocsp_test.c)
target_link_libraries(ocsp_test ${OPENSSL_LIBS})
add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh)