Fix for tests on Visual Studio
- always link static ssl library for tests - copy DLLs for openssl.exe after building tests - add functions to crypto.def
This commit is contained in:
parent
7e4ce26c27
commit
f51c1b3886
@ -2519,6 +2519,8 @@ WHIRLPOOL_BitUpdate
|
||||
WHIRLPOOL_Final
|
||||
WHIRLPOOL_Init
|
||||
WHIRLPOOL_Update
|
||||
X25519
|
||||
X25519_keypair
|
||||
X509V3_EXT_CRL_add_conf
|
||||
X509V3_EXT_CRL_add_nconf
|
||||
X509V3_EXT_REQ_add_conf
|
||||
@ -3096,6 +3098,7 @@ d2i_BASIC_CONSTRAINTS
|
||||
d2i_CERTIFICATEPOLICIES
|
||||
d2i_CRL_DIST_POINTS
|
||||
d2i_DHparams
|
||||
d2i_DHparams_bio
|
||||
d2i_DIRECTORYSTRING
|
||||
d2i_DISPLAYTEXT
|
||||
d2i_DIST_POINT
|
||||
@ -3109,6 +3112,7 @@ d2i_DSA_PUBKEY_bio
|
||||
d2i_DSA_PUBKEY_fp
|
||||
d2i_DSA_SIG
|
||||
d2i_DSAparams
|
||||
d2i_DSAparams_bio
|
||||
d2i_ECDSA_SIG
|
||||
d2i_ECPKPARAMETERS
|
||||
d2i_ECPKParameters
|
||||
@ -3148,10 +3152,12 @@ d2i_OCSP_CRLID
|
||||
d2i_OCSP_ONEREQ
|
||||
d2i_OCSP_REQINFO
|
||||
d2i_OCSP_REQUEST
|
||||
d2i_OCSP_REQUEST_bio
|
||||
d2i_OCSP_RESPBYTES
|
||||
d2i_OCSP_RESPDATA
|
||||
d2i_OCSP_RESPID
|
||||
d2i_OCSP_RESPONSE
|
||||
d2i_OCSP_RESPONSE_bio
|
||||
d2i_OCSP_REVOKEDINFO
|
||||
d2i_OCSP_SERVICELOC
|
||||
d2i_OCSP_SIGNATURE
|
||||
@ -3425,6 +3431,7 @@ i2d_BASIC_CONSTRAINTS
|
||||
i2d_CERTIFICATEPOLICIES
|
||||
i2d_CRL_DIST_POINTS
|
||||
i2d_DHparams
|
||||
i2d_DHparams_bio
|
||||
i2d_DIRECTORYSTRING
|
||||
i2d_DISPLAYTEXT
|
||||
i2d_DIST_POINT
|
||||
@ -3438,6 +3445,7 @@ i2d_DSA_PUBKEY_bio
|
||||
i2d_DSA_PUBKEY_fp
|
||||
i2d_DSA_SIG
|
||||
i2d_DSAparams
|
||||
i2d_DSAparams_bio
|
||||
i2d_ECDSA_SIG
|
||||
i2d_ECPKPARAMETERS
|
||||
i2d_ECPKParameters
|
||||
@ -3477,10 +3485,12 @@ i2d_OCSP_CRLID
|
||||
i2d_OCSP_ONEREQ
|
||||
i2d_OCSP_REQINFO
|
||||
i2d_OCSP_REQUEST
|
||||
i2d_OCSP_REQUEST_bio
|
||||
i2d_OCSP_RESPBYTES
|
||||
i2d_OCSP_RESPDATA
|
||||
i2d_OCSP_RESPID
|
||||
i2d_OCSP_RESPONSE
|
||||
i2d_OCSP_RESPONSE_bio
|
||||
i2d_OCSP_REVOKEDINFO
|
||||
i2d_OCSP_SERVICELOC
|
||||
i2d_OCSP_SIGNATURE
|
||||
|
@ -11,130 +11,138 @@ include_directories(
|
||||
|
||||
add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../apps/openssl/cert.pem\")
|
||||
|
||||
foreach(lib IN LISTS OPENSSL_LIBS)
|
||||
if(${lib} STREQUAL "ssl-shared")
|
||||
set(TESTS_LIBS ${TESTS_LIBS} ssl)
|
||||
else()
|
||||
set(TESTS_LIBS ${TESTS_LIBS} ${lib})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# aeadtest
|
||||
add_executable(aeadtest aeadtest.c)
|
||||
target_link_libraries(aeadtest ${OPENSSL_LIBS})
|
||||
target_link_libraries(aeadtest ${TESTS_LIBS})
|
||||
add_test(aeadtest aeadtest ${CMAKE_CURRENT_SOURCE_DIR}/aeadtests.txt)
|
||||
|
||||
# aes_wrap
|
||||
add_executable(aes_wrap aes_wrap.c)
|
||||
target_link_libraries(aes_wrap ${OPENSSL_LIBS})
|
||||
target_link_libraries(aes_wrap ${TESTS_LIBS})
|
||||
add_test(aes_wrap aes_wrap)
|
||||
|
||||
# arc4randomforktest
|
||||
# Windows/mingw does not have fork, but Cygwin does.
|
||||
if(NOT CMAKE_HOST_WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES "MINGW")
|
||||
add_executable(arc4randomforktest arc4randomforktest.c)
|
||||
target_link_libraries(arc4randomforktest ${OPENSSL_LIBS})
|
||||
target_link_libraries(arc4randomforktest ${TESTS_LIBS})
|
||||
add_test(arc4randomforktest ${CMAKE_CURRENT_SOURCE_DIR}/arc4randomforktest.sh)
|
||||
endif()
|
||||
|
||||
# asn1test
|
||||
add_executable(asn1test asn1test.c)
|
||||
target_link_libraries(asn1test ${OPENSSL_LIBS})
|
||||
target_link_libraries(asn1test ${TESTS_LIBS})
|
||||
add_test(asn1test asn1test)
|
||||
|
||||
# asn1time
|
||||
add_executable(asn1time asn1time.c)
|
||||
target_link_libraries(asn1time ${OPENSSL_LIBS})
|
||||
target_link_libraries(asn1time ${TESTS_LIBS})
|
||||
add_test(asn1time asn1time)
|
||||
|
||||
# base64test
|
||||
add_executable(base64test base64test.c)
|
||||
target_link_libraries(base64test ${OPENSSL_LIBS})
|
||||
target_link_libraries(base64test ${TESTS_LIBS})
|
||||
add_test(base64test base64test)
|
||||
|
||||
# bftest
|
||||
add_executable(bftest bftest.c)
|
||||
target_link_libraries(bftest ${OPENSSL_LIBS})
|
||||
target_link_libraries(bftest ${TESTS_LIBS})
|
||||
add_test(bftest bftest)
|
||||
|
||||
# biotest
|
||||
# the BIO tests rely on resolver results that are OS and environment-specific
|
||||
if(ENABLE_EXTRATESTS)
|
||||
add_executable(biotest biotest.c)
|
||||
target_link_libraries(biotest ${OPENSSL_LIBS})
|
||||
target_link_libraries(biotest ${TESTS_LIBS})
|
||||
add_test(biotest biotest)
|
||||
endif()
|
||||
|
||||
# bntest
|
||||
add_executable(bntest bntest.c)
|
||||
target_link_libraries(bntest ${OPENSSL_LIBS})
|
||||
target_link_libraries(bntest ${TESTS_LIBS})
|
||||
add_test(bntest bntest)
|
||||
|
||||
# bytestringtest
|
||||
add_executable(bytestringtest bytestringtest.c)
|
||||
target_link_libraries(bytestringtest ${OPENSSL_LIBS})
|
||||
target_link_libraries(bytestringtest ${TESTS_LIBS})
|
||||
add_test(bytestringtest bytestringtest)
|
||||
|
||||
# casttest
|
||||
add_executable(casttest casttest.c)
|
||||
target_link_libraries(casttest ${OPENSSL_LIBS})
|
||||
target_link_libraries(casttest ${TESTS_LIBS})
|
||||
add_test(casttest casttest)
|
||||
|
||||
# chachatest
|
||||
add_executable(chachatest chachatest.c)
|
||||
target_link_libraries(chachatest ${OPENSSL_LIBS})
|
||||
target_link_libraries(chachatest ${TESTS_LIBS})
|
||||
add_test(chachatest chachatest)
|
||||
|
||||
# cipher_list
|
||||
add_executable(cipher_list cipher_list.c)
|
||||
target_link_libraries(cipher_list ${OPENSSL_LIBS})
|
||||
target_link_libraries(cipher_list ${TESTS_LIBS})
|
||||
add_test(cipher_list cipher_list)
|
||||
|
||||
# cipherstest
|
||||
add_executable(cipherstest cipherstest.c)
|
||||
target_link_libraries(cipherstest ${OPENSSL_LIBS})
|
||||
target_link_libraries(cipherstest ${TESTS_LIBS})
|
||||
add_test(cipherstest cipherstest)
|
||||
|
||||
# clienttest
|
||||
add_executable(clienttest clienttest.c)
|
||||
target_link_libraries(clienttest ${OPENSSL_LIBS})
|
||||
target_link_libraries(clienttest ${TESTS_LIBS})
|
||||
add_test(clienttest clienttest)
|
||||
|
||||
# cts128test
|
||||
add_executable(cts128test cts128test.c)
|
||||
target_link_libraries(cts128test ${OPENSSL_LIBS})
|
||||
target_link_libraries(cts128test ${TESTS_LIBS})
|
||||
add_test(cts128test cts128test)
|
||||
|
||||
# destest
|
||||
add_executable(destest destest.c)
|
||||
target_link_libraries(destest ${OPENSSL_LIBS})
|
||||
target_link_libraries(destest ${TESTS_LIBS})
|
||||
add_test(destest destest)
|
||||
|
||||
# dhtest
|
||||
add_executable(dhtest dhtest.c)
|
||||
target_link_libraries(dhtest ${OPENSSL_LIBS})
|
||||
target_link_libraries(dhtest ${TESTS_LIBS})
|
||||
add_test(dhtest dhtest)
|
||||
|
||||
# dsatest
|
||||
add_executable(dsatest dsatest.c)
|
||||
target_link_libraries(dsatest ${OPENSSL_LIBS})
|
||||
target_link_libraries(dsatest ${TESTS_LIBS})
|
||||
add_test(dsatest dsatest)
|
||||
|
||||
# ecdhtest
|
||||
add_executable(ecdhtest ecdhtest.c)
|
||||
target_link_libraries(ecdhtest ${OPENSSL_LIBS})
|
||||
target_link_libraries(ecdhtest ${TESTS_LIBS})
|
||||
add_test(ecdhtest ecdhtest)
|
||||
|
||||
# ecdsatest
|
||||
add_executable(ecdsatest ecdsatest.c)
|
||||
target_link_libraries(ecdsatest ${OPENSSL_LIBS})
|
||||
target_link_libraries(ecdsatest ${TESTS_LIBS})
|
||||
add_test(ecdsatest ecdsatest)
|
||||
|
||||
# ectest
|
||||
add_executable(ectest ectest.c)
|
||||
target_link_libraries(ectest ${OPENSSL_LIBS})
|
||||
target_link_libraries(ectest ${TESTS_LIBS})
|
||||
add_test(ectest ectest)
|
||||
|
||||
# enginetest
|
||||
add_executable(enginetest enginetest.c)
|
||||
target_link_libraries(enginetest ${OPENSSL_LIBS})
|
||||
target_link_libraries(enginetest ${TESTS_LIBS})
|
||||
add_test(enginetest enginetest)
|
||||
|
||||
# evptest
|
||||
add_executable(evptest evptest.c)
|
||||
target_link_libraries(evptest ${OPENSSL_LIBS})
|
||||
target_link_libraries(evptest ${TESTS_LIBS})
|
||||
add_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt)
|
||||
|
||||
# explicit_bzero
|
||||
@ -145,59 +153,59 @@ if(NOT CMAKE_HOST_WIN32)
|
||||
else()
|
||||
add_executable(explicit_bzero explicit_bzero.c memmem.c)
|
||||
endif()
|
||||
target_link_libraries(explicit_bzero ${OPENSSL_LIBS})
|
||||
target_link_libraries(explicit_bzero ${TESTS_LIBS})
|
||||
add_test(explicit_bzero explicit_bzero)
|
||||
endif()
|
||||
|
||||
# exptest
|
||||
add_executable(exptest exptest.c)
|
||||
target_link_libraries(exptest ${OPENSSL_LIBS})
|
||||
target_link_libraries(exptest ${TESTS_LIBS})
|
||||
add_test(exptest exptest)
|
||||
|
||||
# gcm128test
|
||||
add_executable(gcm128test gcm128test.c)
|
||||
target_link_libraries(gcm128test ${OPENSSL_LIBS})
|
||||
target_link_libraries(gcm128test ${TESTS_LIBS})
|
||||
add_test(gcm128test gcm128test)
|
||||
|
||||
# gost2814789t
|
||||
add_executable(gost2814789t gost2814789t.c)
|
||||
target_link_libraries(gost2814789t ${OPENSSL_LIBS})
|
||||
target_link_libraries(gost2814789t ${TESTS_LIBS})
|
||||
add_test(gost2814789t gost2814789t)
|
||||
|
||||
# hmactest
|
||||
add_executable(hmactest hmactest.c)
|
||||
target_link_libraries(hmactest ${OPENSSL_LIBS})
|
||||
target_link_libraries(hmactest ${TESTS_LIBS})
|
||||
add_test(hmactest hmactest)
|
||||
|
||||
# ideatest
|
||||
add_executable(ideatest ideatest.c)
|
||||
target_link_libraries(ideatest ${OPENSSL_LIBS})
|
||||
target_link_libraries(ideatest ${TESTS_LIBS})
|
||||
add_test(ideatest ideatest)
|
||||
|
||||
# igetest
|
||||
add_executable(igetest igetest.c)
|
||||
target_link_libraries(igetest ${OPENSSL_LIBS})
|
||||
target_link_libraries(igetest ${TESTS_LIBS})
|
||||
add_test(igetest igetest)
|
||||
|
||||
# md4test
|
||||
add_executable(md4test md4test.c)
|
||||
target_link_libraries(md4test ${OPENSSL_LIBS})
|
||||
target_link_libraries(md4test ${TESTS_LIBS})
|
||||
add_test(md4test md4test)
|
||||
|
||||
# md5test
|
||||
add_executable(md5test md5test.c)
|
||||
target_link_libraries(md5test ${OPENSSL_LIBS})
|
||||
target_link_libraries(md5test ${TESTS_LIBS})
|
||||
add_test(md5test md5test)
|
||||
|
||||
# mont
|
||||
add_executable(mont mont.c)
|
||||
target_link_libraries(mont ${OPENSSL_LIBS})
|
||||
target_link_libraries(mont ${TESTS_LIBS})
|
||||
add_test(mont mont)
|
||||
|
||||
# ocsp_test
|
||||
if(ENABLE_EXTRATESTS)
|
||||
add_executable(ocsp_test ocsp_test.c)
|
||||
target_link_libraries(ocsp_test ${OPENSSL_LIBS})
|
||||
target_link_libraries(ocsp_test ${TESTS_LIBS})
|
||||
if(NOT MSVC)
|
||||
add_test(ocsptest ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh)
|
||||
else()
|
||||
@ -207,12 +215,12 @@ endif()
|
||||
|
||||
# optionstest
|
||||
add_executable(optionstest optionstest.c)
|
||||
target_link_libraries(optionstest ${OPENSSL_LIBS})
|
||||
target_link_libraries(optionstest ${TESTS_LIBS})
|
||||
add_test(optionstest optionstest)
|
||||
|
||||
# pbkdf2
|
||||
add_executable(pbkdf2 pbkdf2.c)
|
||||
target_link_libraries(pbkdf2 ${OPENSSL_LIBS})
|
||||
target_link_libraries(pbkdf2 ${TESTS_LIBS})
|
||||
add_test(pbkdf2 pbkdf2)
|
||||
|
||||
# pidwraptest
|
||||
@ -220,23 +228,23 @@ add_test(pbkdf2 pbkdf2)
|
||||
# awkward on systems with slow fork
|
||||
if(ENABLE_EXTRATESTS AND NOT MSVC)
|
||||
add_executable(pidwraptest pidwraptest.c)
|
||||
target_link_libraries(pidwraptest ${OPENSSL_LIBS})
|
||||
target_link_libraries(pidwraptest ${TESTS_LIBS})
|
||||
add_test(pidwraptest ${CMAKE_CURRENT_SOURCE_DIR}/pidwraptest.sh)
|
||||
endif()
|
||||
|
||||
# pkcs7test
|
||||
add_executable(pkcs7test pkcs7test.c)
|
||||
target_link_libraries(pkcs7test ${OPENSSL_LIBS})
|
||||
target_link_libraries(pkcs7test ${TESTS_LIBS})
|
||||
add_test(pkcs7test pkcs7test)
|
||||
|
||||
# poly1305test
|
||||
add_executable(poly1305test poly1305test.c)
|
||||
target_link_libraries(poly1305test ${OPENSSL_LIBS})
|
||||
target_link_libraries(poly1305test ${TESTS_LIBS})
|
||||
add_test(poly1305test poly1305test)
|
||||
|
||||
# pq_test
|
||||
add_executable(pq_test pq_test.c)
|
||||
target_link_libraries(pq_test ${OPENSSL_LIBS})
|
||||
target_link_libraries(pq_test ${TESTS_LIBS})
|
||||
if(NOT MSVC)
|
||||
add_test(pq_test ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh)
|
||||
else()
|
||||
@ -246,22 +254,22 @@ set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOUR
|
||||
|
||||
# randtest
|
||||
add_executable(randtest randtest.c)
|
||||
target_link_libraries(randtest ${OPENSSL_LIBS})
|
||||
target_link_libraries(randtest ${TESTS_LIBS})
|
||||
add_test(randtest randtest)
|
||||
|
||||
# rc2test
|
||||
add_executable(rc2test rc2test.c)
|
||||
target_link_libraries(rc2test ${OPENSSL_LIBS})
|
||||
target_link_libraries(rc2test ${TESTS_LIBS})
|
||||
add_test(rc2test rc2test)
|
||||
|
||||
# rc4test
|
||||
add_executable(rc4test rc4test.c)
|
||||
target_link_libraries(rc4test ${OPENSSL_LIBS})
|
||||
target_link_libraries(rc4test ${TESTS_LIBS})
|
||||
add_test(rc4test rc4test)
|
||||
|
||||
# rfc5280time
|
||||
add_executable(rfc5280time rfc5280time.c)
|
||||
target_link_libraries(rfc5280time ${OPENSSL_LIBS})
|
||||
target_link_libraries(rfc5280time ${TESTS_LIBS})
|
||||
if(SMALL_TIME_T)
|
||||
add_test(rfc5280time ${CMAKE_CURRENT_SOURCE_DIR}/rfc5280time_small.test)
|
||||
else()
|
||||
@ -270,27 +278,27 @@ endif()
|
||||
|
||||
# rmdtest
|
||||
add_executable(rmdtest rmdtest.c)
|
||||
target_link_libraries(rmdtest ${OPENSSL_LIBS})
|
||||
target_link_libraries(rmdtest ${TESTS_LIBS})
|
||||
add_test(rmdtest rmdtest)
|
||||
|
||||
# sha1test
|
||||
add_executable(sha1test sha1test.c)
|
||||
target_link_libraries(sha1test ${OPENSSL_LIBS})
|
||||
target_link_libraries(sha1test ${TESTS_LIBS})
|
||||
add_test(sha1test sha1test)
|
||||
|
||||
# sha256test
|
||||
add_executable(sha256test sha256test.c)
|
||||
target_link_libraries(sha256test ${OPENSSL_LIBS})
|
||||
target_link_libraries(sha256test ${TESTS_LIBS})
|
||||
add_test(sha256test sha256test)
|
||||
|
||||
# sha512test
|
||||
add_executable(sha512test sha512test.c)
|
||||
target_link_libraries(sha512test ${OPENSSL_LIBS})
|
||||
target_link_libraries(sha512test ${TESTS_LIBS})
|
||||
add_test(sha512test sha512test)
|
||||
|
||||
# ssltest
|
||||
add_executable(ssltest ssltest.c)
|
||||
target_link_libraries(ssltest ${OPENSSL_LIBS})
|
||||
target_link_libraries(ssltest ${TESTS_LIBS})
|
||||
if(NOT MSVC)
|
||||
add_test(ssltest ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh)
|
||||
else()
|
||||
@ -324,25 +332,35 @@ set_tests_properties(testrsa PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOUR
|
||||
|
||||
# timingsafe
|
||||
add_executable(timingsafe timingsafe.c)
|
||||
target_link_libraries(timingsafe ${OPENSSL_LIBS})
|
||||
target_link_libraries(timingsafe ${TESTS_LIBS})
|
||||
add_test(timingsafe timingsafe)
|
||||
|
||||
# tls_ext_alpn
|
||||
add_executable(tls_ext_alpn tls_ext_alpn.c)
|
||||
target_link_libraries(tls_ext_alpn ${OPENSSL_LIBS})
|
||||
target_link_libraries(tls_ext_alpn ${TESTS_LIBS})
|
||||
add_test(tls_ext_alpn tls_ext_alpn)
|
||||
|
||||
# utf8test
|
||||
add_executable(utf8test utf8test.c)
|
||||
target_link_libraries(utf8test ${OPENSSL_LIBS})
|
||||
target_link_libraries(utf8test ${TESTS_LIBS})
|
||||
add_test(utf8test utf8test)
|
||||
|
||||
# verifytest
|
||||
add_executable(verifytest verifytest.c)
|
||||
target_link_libraries(verifytest tls ${OPENSSL_LIBS})
|
||||
target_link_libraries(verifytest tls ${TESTS_LIBS})
|
||||
add_test(verifytest verifytest)
|
||||
|
||||
# x25519test
|
||||
add_executable(x25519test x25519test.c)
|
||||
target_link_libraries(x25519test ${OPENSSL_LIBS})
|
||||
target_link_libraries(x25519test ${TESTS_LIBS})
|
||||
add_test(x25519test x25519test)
|
||||
|
||||
if(ENABLE_VSTEST AND USE_SHARED)
|
||||
add_custom_command(TARGET x25519test POST_BUILD
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy
|
||||
"$<TARGET_FILE:ssl-shared>"
|
||||
"$<TARGET_FILE:crypto-shared>"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}"
|
||||
COMMENT "Copying DLLs for regression tests")
|
||||
endif()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user