programs, tests: Depend only on libmbedcrypto
Update the tests and programs to depend only on libmbedcrypto, since we'll soon only build libmbedcrypto.
This commit is contained in:
parent
0688e4f266
commit
986a15199d
@ -9,14 +9,12 @@ LDFLAGS ?=
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = -L../library \
|
||||
-lmbedtls$(SHARED_SUFFIX) \
|
||||
-lmbedx509$(SHARED_SUFFIX) \
|
||||
-lmbedcrypto$(SHARED_SUFFIX)
|
||||
|
||||
ifndef SHARED
|
||||
DEP=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
|
||||
DEP=../library/libmbedcrypto.a
|
||||
else
|
||||
DEP=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
|
||||
DEP=../library/libmbedcrypto.$(DLEXT)
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
|
@ -1,8 +1,8 @@
|
||||
add_executable(aescrypt2 aescrypt2.c)
|
||||
target_link_libraries(aescrypt2 mbedtls)
|
||||
target_link_libraries(aescrypt2 mbedcrypto)
|
||||
|
||||
add_executable(crypt_and_hash crypt_and_hash.c)
|
||||
target_link_libraries(crypt_and_hash mbedtls)
|
||||
target_link_libraries(crypt_and_hash mbedcrypto)
|
||||
|
||||
install(TARGETS aescrypt2 crypt_and_hash
|
||||
DESTINATION "bin"
|
||||
|
@ -1,8 +1,8 @@
|
||||
add_executable(hello hello.c)
|
||||
target_link_libraries(hello mbedtls)
|
||||
target_link_libraries(hello mbedcrypto)
|
||||
|
||||
add_executable(generic_sum generic_sum.c)
|
||||
target_link_libraries(generic_sum mbedtls)
|
||||
target_link_libraries(generic_sum mbedcrypto)
|
||||
|
||||
install(TARGETS hello generic_sum
|
||||
DESTINATION "bin"
|
||||
|
@ -1,56 +1,56 @@
|
||||
add_executable(dh_genprime dh_genprime.c)
|
||||
target_link_libraries(dh_genprime mbedtls)
|
||||
target_link_libraries(dh_genprime mbedcrypto)
|
||||
|
||||
add_executable(ecdh_curve25519 ecdh_curve25519.c)
|
||||
target_link_libraries(ecdh_curve25519 mbedtls)
|
||||
target_link_libraries(ecdh_curve25519 mbedcrypto)
|
||||
|
||||
add_executable(ecdsa ecdsa.c)
|
||||
target_link_libraries(ecdsa mbedtls)
|
||||
target_link_libraries(ecdsa mbedcrypto)
|
||||
|
||||
add_executable(gen_key gen_key.c)
|
||||
target_link_libraries(gen_key mbedtls)
|
||||
target_link_libraries(gen_key mbedcrypto)
|
||||
|
||||
add_executable(key_app key_app.c)
|
||||
target_link_libraries(key_app mbedtls)
|
||||
target_link_libraries(key_app mbedcrypto)
|
||||
|
||||
add_executable(key_app_writer key_app_writer.c)
|
||||
target_link_libraries(key_app_writer mbedtls)
|
||||
target_link_libraries(key_app_writer mbedcrypto)
|
||||
|
||||
add_executable(mpi_demo mpi_demo.c)
|
||||
target_link_libraries(mpi_demo mbedtls)
|
||||
target_link_libraries(mpi_demo mbedcrypto)
|
||||
|
||||
add_executable(rsa_genkey rsa_genkey.c)
|
||||
target_link_libraries(rsa_genkey mbedtls)
|
||||
target_link_libraries(rsa_genkey mbedcrypto)
|
||||
|
||||
add_executable(rsa_sign rsa_sign.c)
|
||||
target_link_libraries(rsa_sign mbedtls)
|
||||
target_link_libraries(rsa_sign mbedcrypto)
|
||||
|
||||
add_executable(rsa_verify rsa_verify.c)
|
||||
target_link_libraries(rsa_verify mbedtls)
|
||||
target_link_libraries(rsa_verify mbedcrypto)
|
||||
|
||||
add_executable(rsa_sign_pss rsa_sign_pss.c)
|
||||
target_link_libraries(rsa_sign_pss mbedtls)
|
||||
target_link_libraries(rsa_sign_pss mbedcrypto)
|
||||
|
||||
add_executable(rsa_verify_pss rsa_verify_pss.c)
|
||||
target_link_libraries(rsa_verify_pss mbedtls)
|
||||
target_link_libraries(rsa_verify_pss mbedcrypto)
|
||||
|
||||
add_executable(rsa_encrypt rsa_encrypt.c)
|
||||
target_link_libraries(rsa_encrypt mbedtls)
|
||||
target_link_libraries(rsa_encrypt mbedcrypto)
|
||||
|
||||
add_executable(rsa_decrypt rsa_decrypt.c)
|
||||
target_link_libraries(rsa_decrypt mbedtls)
|
||||
target_link_libraries(rsa_decrypt mbedcrypto)
|
||||
|
||||
add_executable(pk_sign pk_sign.c)
|
||||
target_link_libraries(pk_sign mbedtls)
|
||||
target_link_libraries(pk_sign mbedcrypto)
|
||||
|
||||
add_executable(pk_verify pk_verify.c)
|
||||
target_link_libraries(pk_verify mbedtls)
|
||||
target_link_libraries(pk_verify mbedcrypto)
|
||||
|
||||
add_executable(pk_encrypt pk_encrypt.c)
|
||||
target_link_libraries(pk_encrypt mbedtls)
|
||||
target_link_libraries(pk_encrypt mbedcrypto)
|
||||
|
||||
add_executable(pk_decrypt pk_decrypt.c)
|
||||
target_link_libraries(pk_decrypt mbedtls)
|
||||
target_link_libraries(pk_decrypt mbedcrypto)
|
||||
|
||||
install(TARGETS dh_genprime key_app mpi_demo rsa_genkey rsa_sign rsa_verify rsa_encrypt rsa_decrypt pk_encrypt pk_decrypt pk_sign pk_verify gen_key
|
||||
DESTINATION "bin"
|
||||
|
@ -1,11 +1,11 @@
|
||||
add_executable(crypto_examples crypto_examples.c)
|
||||
target_link_libraries(crypto_examples mbedtls)
|
||||
target_link_libraries(crypto_examples mbedcrypto)
|
||||
|
||||
add_executable(key_ladder_demo key_ladder_demo.c)
|
||||
target_link_libraries(key_ladder_demo mbedtls)
|
||||
target_link_libraries(key_ladder_demo mbedcrypto)
|
||||
|
||||
add_executable(psa_constant_names psa_constant_names.c)
|
||||
target_link_libraries(psa_constant_names mbedtls)
|
||||
target_link_libraries(psa_constant_names mbedcrypto)
|
||||
|
||||
add_custom_target(
|
||||
psa_constant_names_generated
|
||||
|
@ -1,11 +1,11 @@
|
||||
add_executable(gen_random_havege gen_random_havege.c)
|
||||
target_link_libraries(gen_random_havege mbedtls)
|
||||
target_link_libraries(gen_random_havege mbedcrypto)
|
||||
|
||||
add_executable(gen_random_ctr_drbg gen_random_ctr_drbg.c)
|
||||
target_link_libraries(gen_random_ctr_drbg mbedtls)
|
||||
target_link_libraries(gen_random_ctr_drbg mbedcrypto)
|
||||
|
||||
add_executable(gen_entropy gen_entropy.c)
|
||||
target_link_libraries(gen_entropy mbedtls)
|
||||
target_link_libraries(gen_entropy mbedcrypto)
|
||||
|
||||
install(TARGETS gen_random_havege gen_random_ctr_drbg gen_entropy
|
||||
DESTINATION "bin"
|
||||
|
@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedtls
|
||||
mbedcrypto
|
||||
)
|
||||
|
||||
add_executable(selftest selftest.c)
|
||||
|
@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedtls
|
||||
mbedcrypto
|
||||
)
|
||||
|
||||
add_executable(strerror strerror.c)
|
||||
|
@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedtls
|
||||
mbedcrypto
|
||||
)
|
||||
|
||||
find_package(Perl)
|
||||
@ -29,7 +29,7 @@ function(add_test_suite suite_name)
|
||||
add_custom_command(
|
||||
OUTPUT test_suite_${data_name}.c
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py -f ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function -d ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data -t ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function -p ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function -s ${CMAKE_CURRENT_SOURCE_DIR}/suites --helpers-file ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function -o .
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedtls ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/scripts/generate_test_code.py mbedcrypto ${CMAKE_CURRENT_SOURCE_DIR}/suites/helpers.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/main_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/host_test.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${suite_name}.function ${CMAKE_CURRENT_SOURCE_DIR}/suites/test_suite_${data_name}.data
|
||||
)
|
||||
|
||||
set(exe_name test_suite_${data_name})
|
||||
|
@ -8,8 +8,6 @@ LDFLAGS ?=
|
||||
CRYPTO_INCLUDES ?= -I../include
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) $(CRYPTO_INCLUDES) -I../library -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = -L../library \
|
||||
-lmbedtls$(SHARED_SUFFIX) \
|
||||
-lmbedx509$(SHARED_SUFFIX) \
|
||||
-lmbedcrypto$(SHARED_SUFFIX)
|
||||
|
||||
# Enable definition of various functions used throughout the testsuite
|
||||
|
@ -14,6 +14,12 @@
|
||||
OPENSSL ?= openssl
|
||||
FAKETIME ?= faketime
|
||||
|
||||
# Tools from Mbed TLS
|
||||
# Mbed Crypto depends on Mbed TLS programs to generate its test certificates.
|
||||
# These programs can be installed from Mbed TLS.
|
||||
MBEDTLS_CERT_WRITE ?= mbedtls_cert_write
|
||||
MBEDTLS_CERT_REQ ?= mbedtls_cert_req
|
||||
|
||||
|
||||
## Build the generated test data. Note that since the final outputs
|
||||
## are committed to the repository, this target should do nothing on a
|
||||
|
Loading…
Reference in New Issue
Block a user