Revert "programs, tests: Depend only on libmbedcrypto"
This reverts commit 986a15199d
.
This commit is contained in:
parent
722a7e6940
commit
4fa9f9f744
@ -9,15 +9,17 @@ 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)
|
||||
|
||||
include ../3rdparty/Makefile.inc
|
||||
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
|
||||
|
||||
ifndef SHARED
|
||||
DEP=../library/libmbedcrypto.a
|
||||
DEP=../library/libmbedcrypto.a ../library/libmbedx509.a ../library/libmbedtls.a
|
||||
else
|
||||
DEP=../library/libmbedcrypto.$(DLEXT)
|
||||
DEP=../library/libmbedcrypto.$(DLEXT) ../library/libmbedx509.$(DLEXT) ../library/libmbedtls.$(DLEXT)
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
|
@ -1,8 +1,8 @@
|
||||
add_executable(aescrypt2 aescrypt2.c)
|
||||
target_link_libraries(aescrypt2 mbedcrypto)
|
||||
target_link_libraries(aescrypt2 mbedtls)
|
||||
|
||||
add_executable(crypt_and_hash crypt_and_hash.c)
|
||||
target_link_libraries(crypt_and_hash mbedcrypto)
|
||||
target_link_libraries(crypt_and_hash mbedtls)
|
||||
|
||||
install(TARGETS aescrypt2 crypt_and_hash
|
||||
DESTINATION "bin"
|
||||
|
@ -1,8 +1,8 @@
|
||||
add_executable(hello hello.c)
|
||||
target_link_libraries(hello mbedcrypto)
|
||||
target_link_libraries(hello mbedtls)
|
||||
|
||||
add_executable(generic_sum generic_sum.c)
|
||||
target_link_libraries(generic_sum mbedcrypto)
|
||||
target_link_libraries(generic_sum mbedtls)
|
||||
|
||||
install(TARGETS hello generic_sum
|
||||
DESTINATION "bin"
|
||||
|
@ -1,56 +1,56 @@
|
||||
add_executable(dh_genprime dh_genprime.c)
|
||||
target_link_libraries(dh_genprime mbedcrypto)
|
||||
target_link_libraries(dh_genprime mbedtls)
|
||||
|
||||
add_executable(ecdh_curve25519 ecdh_curve25519.c)
|
||||
target_link_libraries(ecdh_curve25519 mbedcrypto)
|
||||
target_link_libraries(ecdh_curve25519 mbedtls)
|
||||
|
||||
add_executable(ecdsa ecdsa.c)
|
||||
target_link_libraries(ecdsa mbedcrypto)
|
||||
target_link_libraries(ecdsa mbedtls)
|
||||
|
||||
add_executable(gen_key gen_key.c)
|
||||
target_link_libraries(gen_key mbedcrypto)
|
||||
target_link_libraries(gen_key mbedtls)
|
||||
|
||||
add_executable(key_app key_app.c)
|
||||
target_link_libraries(key_app mbedcrypto)
|
||||
target_link_libraries(key_app mbedtls)
|
||||
|
||||
add_executable(key_app_writer key_app_writer.c)
|
||||
target_link_libraries(key_app_writer mbedcrypto)
|
||||
target_link_libraries(key_app_writer mbedtls)
|
||||
|
||||
add_executable(mpi_demo mpi_demo.c)
|
||||
target_link_libraries(mpi_demo mbedcrypto)
|
||||
target_link_libraries(mpi_demo mbedtls)
|
||||
|
||||
add_executable(rsa_genkey rsa_genkey.c)
|
||||
target_link_libraries(rsa_genkey mbedcrypto)
|
||||
target_link_libraries(rsa_genkey mbedtls)
|
||||
|
||||
add_executable(rsa_sign rsa_sign.c)
|
||||
target_link_libraries(rsa_sign mbedcrypto)
|
||||
target_link_libraries(rsa_sign mbedtls)
|
||||
|
||||
add_executable(rsa_verify rsa_verify.c)
|
||||
target_link_libraries(rsa_verify mbedcrypto)
|
||||
target_link_libraries(rsa_verify mbedtls)
|
||||
|
||||
add_executable(rsa_sign_pss rsa_sign_pss.c)
|
||||
target_link_libraries(rsa_sign_pss mbedcrypto)
|
||||
target_link_libraries(rsa_sign_pss mbedtls)
|
||||
|
||||
add_executable(rsa_verify_pss rsa_verify_pss.c)
|
||||
target_link_libraries(rsa_verify_pss mbedcrypto)
|
||||
target_link_libraries(rsa_verify_pss mbedtls)
|
||||
|
||||
add_executable(rsa_encrypt rsa_encrypt.c)
|
||||
target_link_libraries(rsa_encrypt mbedcrypto)
|
||||
target_link_libraries(rsa_encrypt mbedtls)
|
||||
|
||||
add_executable(rsa_decrypt rsa_decrypt.c)
|
||||
target_link_libraries(rsa_decrypt mbedcrypto)
|
||||
target_link_libraries(rsa_decrypt mbedtls)
|
||||
|
||||
add_executable(pk_sign pk_sign.c)
|
||||
target_link_libraries(pk_sign mbedcrypto)
|
||||
target_link_libraries(pk_sign mbedtls)
|
||||
|
||||
add_executable(pk_verify pk_verify.c)
|
||||
target_link_libraries(pk_verify mbedcrypto)
|
||||
target_link_libraries(pk_verify mbedtls)
|
||||
|
||||
add_executable(pk_encrypt pk_encrypt.c)
|
||||
target_link_libraries(pk_encrypt mbedcrypto)
|
||||
target_link_libraries(pk_encrypt mbedtls)
|
||||
|
||||
add_executable(pk_decrypt pk_decrypt.c)
|
||||
target_link_libraries(pk_decrypt mbedcrypto)
|
||||
target_link_libraries(pk_decrypt mbedtls)
|
||||
|
||||
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 mbedcrypto)
|
||||
target_link_libraries(crypto_examples mbedtls)
|
||||
|
||||
add_executable(key_ladder_demo key_ladder_demo.c)
|
||||
target_link_libraries(key_ladder_demo mbedcrypto)
|
||||
target_link_libraries(key_ladder_demo mbedtls)
|
||||
|
||||
add_executable(psa_constant_names psa_constant_names.c)
|
||||
target_link_libraries(psa_constant_names mbedcrypto)
|
||||
target_link_libraries(psa_constant_names mbedtls)
|
||||
|
||||
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 mbedcrypto)
|
||||
target_link_libraries(gen_random_havege mbedtls)
|
||||
|
||||
add_executable(gen_random_ctr_drbg gen_random_ctr_drbg.c)
|
||||
target_link_libraries(gen_random_ctr_drbg mbedcrypto)
|
||||
target_link_libraries(gen_random_ctr_drbg mbedtls)
|
||||
|
||||
add_executable(gen_entropy gen_entropy.c)
|
||||
target_link_libraries(gen_entropy mbedcrypto)
|
||||
target_link_libraries(gen_entropy mbedtls)
|
||||
|
||||
install(TARGETS gen_random_havege gen_random_ctr_drbg gen_entropy
|
||||
DESTINATION "bin"
|
||||
|
@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedcrypto
|
||||
mbedtls
|
||||
)
|
||||
|
||||
add_executable(selftest selftest.c)
|
||||
|
@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedcrypto
|
||||
mbedtls
|
||||
)
|
||||
|
||||
add_executable(strerror strerror.c)
|
||||
|
@ -1,5 +1,5 @@
|
||||
set(libs
|
||||
mbedcrypto
|
||||
mbedtls
|
||||
)
|
||||
|
||||
# Set the project root directory if it's not already defined, as may happen if
|
||||
@ -36,7 +36,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 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
|
||||
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
|
||||
)
|
||||
|
||||
set(exe_name test_suite_${data_name})
|
||||
|
@ -8,6 +8,8 @@ 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)
|
||||
|
||||
include ../3rdparty/Makefile.inc
|
||||
|
@ -14,12 +14,6 @@
|
||||
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