mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Replace references to tests/include
Update them instead to refer to framework/include, where the contents of tests/include have been moved. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@@ -316,7 +316,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/framework/src/drivers/*.c)
|
||||
add_library(mbedtls_test OBJECT ${MBEDTLS_TEST_FILES})
|
||||
target_include_directories(mbedtls_test
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/framework/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library)
|
||||
# Request C11, needed for memory poisoning tests
|
||||
@@ -326,7 +326,7 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/framework/src/test_helpers/*.c)
|
||||
add_library(mbedtls_test_helpers OBJECT ${MBEDTLS_TEST_HELPER_FILES})
|
||||
target_include_directories(mbedtls_test_helpers
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/tests/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/framework/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/library
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/everest/include)
|
||||
|
4
Makefile
4
Makefile
@@ -198,7 +198,7 @@ C_SOURCE_FILES = $(wildcard \
|
||||
include/*/*.h \
|
||||
library/*.[hc] \
|
||||
programs/*/*.[hc] \
|
||||
tests/include/*/*.h tests/include/*/*/*.h \
|
||||
framework/include/*/*.h framework/include/*/*/*.h \
|
||||
framework/src/*.c framework/src/*/*.c \
|
||||
tests/suites/*.function \
|
||||
)
|
||||
@@ -213,5 +213,5 @@ GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES)
|
||||
ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc
|
||||
cscope: cscope.in.out cscope.po.out cscope.out
|
||||
cscope.in.out cscope.po.out cscope.out: $(C_SOURCE_FILES)
|
||||
cscope -bq -u -Iinclude -Ilibrary $(patsubst %,-I%,$(wildcard 3rdparty/*/include)) -Itests/include $(C_SOURCE_FILES)
|
||||
cscope -bq -u -Iinclude -Ilibrary $(patsubst %,-I%,$(wildcard 3rdparty/*/include)) -Iframework/include $(C_SOURCE_FILES)
|
||||
.PHONY: cscope global
|
||||
|
@@ -78,7 +78,7 @@ Summary of files to modify when adding a new algorithm or key type:
|
||||
|
||||
* [ ] PSA Crypto API draft, if not already done — [PSA standardization](#psa-standardization)
|
||||
* [ ] `include/psa/crypto_values.h` or `include/psa/crypto_extra.h` — [New functions and macros](#new-functions-and-macros)
|
||||
* [ ] `include/psa/crypto_config.h`, `tests/include/test/drivers/crypto_config_test_driver_extension.h` — [Preprocessor symbols](#preprocessor-symbols)
|
||||
* [ ] `include/psa/crypto_config.h`, `framework/include/test/drivers/crypto_config_test_driver_extension.h` — [Preprocessor symbols](#preprocessor-symbols)
|
||||
* Occasionally `library/check_crypto_config.h` — [Preprocessor symbols](#preprocessor-symbols)
|
||||
* [ ] `include/mbedtls/config_psa.h` — [Preprocessor symbols](#preprocessor-symbols)
|
||||
* [ ] `library/psa_crypto.c`, `library/psa_crypto_*.[hc]` — [Implementation of the mechanisms](#implementation-of-the-mechanisms)
|
||||
@@ -128,7 +128,7 @@ Each cryptographic mechanism is optional and can be selected by the application
|
||||
* If `MBEDTLS_PSA_CRYPTO_CONFIG` is disabled: based on the available mechanisms in Mbed TLS, deduced from `mbedtls/mbedtls_config.h` by code in `include/mbedtls/config_psa.h`.
|
||||
* if `MBEDTLS_PSA_CRYPTO_CONFIG` is enabled: in the application configuration file `include/psa/crypto_config.h` (or `MBEDTLS_PSA_CRYPTO_CONFIG_FILE`, plus `MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE`), with code in `include/mbedtls/config_psa.h` deducing the necessary underlying `MBEDTLS_xxx` symbols.
|
||||
* For transparent keys (keys that are not in a secure element), the feature is implemented by Mbed TLS if `MBEDTLS_PSA_BUILTIN_ttt_xxx` is defined, and by an accelerator driver if `MBEDTLS_PSA_ACCEL_ttt_xxx` is defined. `MBEDTLS_PSA_BUILTIN_ttt_xxx` constants are set in `include/mbedtls/config_psa.h` based on the application requests `PSA_WANT_ttt_xxx` and the accelerator driver declarations `MBEDTLS_PSA_ACCEL_ttt_xxx`.
|
||||
* For the testing of the driver dispatch code, `tests/include/test/drivers/crypto_config_test_driver_extension.h` sets additional `MBEDTLS_PSA_ACCEL_xxx` symbols.
|
||||
* For the testing of the driver dispatch code, `framework/include/test/drivers/crypto_config_test_driver_extension.h` sets additional `MBEDTLS_PSA_ACCEL_xxx` symbols.
|
||||
|
||||
For more details, see *[Conditional inclusion of cryptographic mechanism through the PSA API in Mbed TLS](../proposed/psa-conditional-inclusion-c.html)*.
|
||||
|
||||
|
@@ -43,7 +43,7 @@ There are three deliverables for creating such a driver. These are:
|
||||
- C header files defining the types required by the driver description. The names of these header files are declared in the driver description file.
|
||||
- An object file compiled for the target platform defining the functions required by the driver description. Implementations may allow drivers to be provided as source files and compiled with the core instead of being pre-compiled.
|
||||
|
||||
The Mbed TLS driver tests for the aforementioned entry points provide examples of how these deliverables can be implemented. For sample driver description JSON files, see [`mbedtls_test_transparent_driver.json`](https://github.com/Mbed-TLS/mbedtls/blob/development/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json) or [`mbedtls_test_opaque_driver.json`](https://github.com/Mbed-TLS/mbedtls/blob/development/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json). The header file required by the driver description is [`test_driver.h`](https://github.com/Mbed-TLS/mbedtls/blob/development/tests/include/test/drivers/test_driver.h). As Mbed TLS tests are built from source, there is no object file for the test driver. However, the source for the test driver can be found under `framework/src/drivers`.
|
||||
The Mbed TLS driver tests for the aforementioned entry points provide examples of how these deliverables can be implemented. For sample driver description JSON files, see [`mbedtls_test_transparent_driver.json`](https://github.com/Mbed-TLS/mbedtls/blob/development/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json) or [`mbedtls_test_opaque_driver.json`](https://github.com/Mbed-TLS/mbedtls/blob/development/scripts/data_files/driver_jsons/mbedtls_test_transparent_driver.json). The header file required by the driver description is [`test_driver.h`](https://github.com/Mbed-TLS/mbedtls/blob/development/framework/include/test/drivers/test_driver.h). As Mbed TLS tests are built from source, there is no object file for the test driver. However, the source for the test driver can be found under `framework/src/drivers`.
|
||||
|
||||
### Process for Entry Points where auto-generation is not implemented
|
||||
|
||||
|
@@ -6,7 +6,7 @@ EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = YES
|
||||
EXTRACT_STATIC = YES
|
||||
CASE_SENSE_NAMES = NO
|
||||
INPUT = ../include input ../tests/include/alt-dummy
|
||||
INPUT = ../include input ../framework/include/alt-dummy
|
||||
FILE_PATTERNS = *.h
|
||||
RECURSIVE = YES
|
||||
EXCLUDE_SYMLINKS = YES
|
||||
|
@@ -5,7 +5,7 @@ set(executables
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -5,7 +5,7 @@ set(executables
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -38,7 +38,7 @@ foreach(exe IN LISTS executables_no_common_c executables_with_common_c)
|
||||
endif()
|
||||
|
||||
add_executable(${exe} ${exe_sources})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
|
||||
if (NOT FUZZINGENGINE_LIB)
|
||||
target_link_libraries(${exe} ${libs})
|
||||
|
@@ -7,7 +7,7 @@ set(executables
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -6,7 +6,7 @@ set(executables_mbedtls
|
||||
foreach(exe IN LISTS executables_mbedtls)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedtls_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
set(executables_mbedcrypto
|
||||
@@ -33,7 +33,7 @@ set(executables_mbedcrypto
|
||||
foreach(exe IN LISTS executables_mbedcrypto)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables_mbedtls} ${executables_mbedcrypto}
|
||||
|
@@ -29,7 +29,7 @@ endif()
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
target_include_directories(psa_constant_names PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
@@ -6,7 +6,7 @@ set(executables
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${mbedcrypto_target} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -39,7 +39,7 @@ foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>
|
||||
${extra_sources})
|
||||
target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
if(exe STREQUAL "ssl_client2" OR exe STREQUAL "ssl_server2")
|
||||
if(GEN_FILES)
|
||||
add_dependencies(${exe} generate_query_config_c)
|
||||
@@ -51,7 +51,7 @@ endforeach()
|
||||
|
||||
if(THREADS_FOUND)
|
||||
add_executable(ssl_pthread_server ssl_pthread_server.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_include_directories(ssl_pthread_server PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(ssl_pthread_server PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
target_link_libraries(ssl_pthread_server ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||
list(APPEND executables ssl_pthread_server)
|
||||
endif(THREADS_FOUND)
|
||||
|
@@ -72,7 +72,7 @@ foreach(exe IN LISTS executables_libs executables_mbedcrypto)
|
||||
endif()
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>
|
||||
${extra_sources})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../library)
|
||||
if(exe STREQUAL "query_compile_time_config")
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
@@ -10,7 +10,7 @@ set(executables
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
install(TARGETS ${executables}
|
||||
|
@@ -14,7 +14,7 @@ set(executables
|
||||
foreach(exe IN LISTS executables)
|
||||
add_executable(${exe} ${exe}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(${exe} ${libs} ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../tests/include)
|
||||
target_include_directories(${exe} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../framework/include)
|
||||
endforeach()
|
||||
|
||||
target_link_libraries(cert_app ${mbedtls_target})
|
||||
|
@@ -22,7 +22,7 @@ WARNING_CXXFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
|
||||
LDFLAGS ?=
|
||||
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I$(MBEDTLS_TEST_PATH)/include -I$(MBEDTLS_PATH)/include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I$(MBEDTLS_PATH)/include -I$(MBEDTLS_PATH)/tests/include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_CXXFLAGS = $(WARNING_CXXFLAGS) -I$(MBEDTLS_PATH)/include -I$(MBEDTLS_PATH)/framework/include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = ${MBEDTLS_TEST_OBJS} \
|
||||
-L$(MBEDTLS_PATH)/library \
|
||||
-lmbedtls$(SHARED_SUFFIX) \
|
||||
|
@@ -26,8 +26,8 @@ my $mbedtls_header_dir = 'include/mbedtls';
|
||||
my $psa_header_dir = 'include/psa';
|
||||
my $source_dir = 'library';
|
||||
my $test_source_dir = 'framework/src';
|
||||
my $test_header_dir = 'tests/include/test';
|
||||
my $test_drivers_header_dir = 'tests/include/test/drivers';
|
||||
my $test_header_dir = 'framework/include/test';
|
||||
my $test_drivers_header_dir = 'framework/include/test/drivers';
|
||||
my $test_drivers_source_dir = 'framework/src/drivers';
|
||||
|
||||
my @thirdparty_header_dirs = qw(
|
||||
@@ -48,7 +48,7 @@ my @include_directories = qw(
|
||||
3rdparty/everest/include/everest
|
||||
3rdparty/everest/include/everest/vs2013
|
||||
3rdparty/everest/include/everest/kremlib
|
||||
tests/include
|
||||
framework/include
|
||||
);
|
||||
my $include_directories = join(';', map {"../../$_"} @include_directories);
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
* do nothing are defined for convenience.
|
||||
*
|
||||
* \note #TEST_CF_SECRET must be called directly from within a .function file,
|
||||
* not indirectly via a macro defined under tests/include or a function
|
||||
* not indirectly via a macro defined under framework/include or a function
|
||||
* under framework/src. This is because we only run Valgrind for constant
|
||||
* flow on test suites that have greppable annotations inside them (see
|
||||
* `skip_suites_without_constant_flow` in `tests/scripts/all.sh`).
|
||||
|
@@ -137,7 +137,7 @@ pre_initialize_variables () {
|
||||
CONFIG_H='drivers/builtin/include/mbedtls/mbedtls_config.h'
|
||||
fi
|
||||
CRYPTO_CONFIG_H='include/psa/crypto_config.h'
|
||||
CONFIG_TEST_DRIVER_H='tests/include/test/drivers/config_test_driver.h'
|
||||
CONFIG_TEST_DRIVER_H='framework/include/test/drivers/config_test_driver.h'
|
||||
|
||||
# Files that are clobbered by some jobs will be backed up. Use a different
|
||||
# suffix from auxiliary scripts so that all.sh and auxiliary scripts can
|
||||
@@ -866,7 +866,7 @@ clang_version() {
|
||||
# being accelerated. You may need to also disable modules that depend
|
||||
# on them or options that are not supported with drivers.
|
||||
# 2d. On top of psa/crypto_config.h, the driver library uses its own config
|
||||
# file: tests/include/test/drivers/config_test_driver.h. You usually
|
||||
# file: framework/include/test/drivers/config_test_driver.h. You usually
|
||||
# don't need to edit it: using loc_extra_list (see below) is preferred.
|
||||
# However, when there's no PSA symbol for what you want to enable,
|
||||
# calling scripts/config.py on this file remains the only option.
|
||||
@@ -991,7 +991,7 @@ helper_libtestdriver1_make_main() {
|
||||
# we need flags both with and without the LIBTESTDRIVER1_ prefix
|
||||
loc_accel_flags=$( echo "$loc_accel_list" | sed 's/[^ ]* */-DLIBTESTDRIVER1_MBEDTLS_PSA_ACCEL_&/g' )
|
||||
loc_accel_flags="$loc_accel_flags $( echo "$loc_accel_list" | sed 's/[^ ]* */-DMBEDTLS_PSA_ACCEL_&/g' )"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -I../tests/include -I../tests -I../../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" "$@"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -I../framework/include -I../tests -I../../tests -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_TEST_LIBTESTDRIVER1 $loc_accel_flags" LDFLAGS="-ltestdriver1 $ASAN_CFLAGS" "$@"
|
||||
}
|
||||
|
||||
################################################################
|
||||
@@ -1288,12 +1288,12 @@ component_build_psa_crypto_spm () {
|
||||
# We can only compile, not link, since our test and sample programs
|
||||
# aren't equipped for the modified names used when MBEDTLS_PSA_CRYPTO_SPM
|
||||
# is active.
|
||||
make CC=gcc CFLAGS='-Werror -Wall -Wextra -I../tests/include/spe' lib
|
||||
make CC=gcc CFLAGS='-Werror -Wall -Wextra -I../framework/include/spe' lib
|
||||
|
||||
# Check that if a symbol is renamed by crypto_spe.h, the non-renamed
|
||||
# version is not present.
|
||||
echo "Checking for renamed symbols in the library"
|
||||
check_renamed_symbols tests/include/spe/crypto_spe.h library/libmbedcrypto.a
|
||||
check_renamed_symbols framework/include/spe/crypto_spe.h library/libmbedcrypto.a
|
||||
}
|
||||
|
||||
# Get a list of library-wise undefined symbols and ensure that they only
|
||||
@@ -2172,7 +2172,7 @@ component_test_full_cmake_clang () {
|
||||
skip_suites_without_constant_flow () {
|
||||
# Skip the test suites that don't have any constant-flow annotations.
|
||||
# This will need to be adjusted if we ever start declaring things as
|
||||
# secret from macros or functions inside tests/include or framework/src.
|
||||
# secret from macros or functions inside framework/include or framework/src.
|
||||
SKIP_TEST_SUITES=$(
|
||||
git -C tests/suites grep -L TEST_CF_ 'test_suite_*.function' |
|
||||
sed 's/test_suite_//; s/\.function$//' |
|
||||
@@ -2418,7 +2418,7 @@ component_test_crypto_for_psa_service () {
|
||||
component_build_crypto_baremetal () {
|
||||
msg "build: make, crypto only, baremetal config"
|
||||
scripts/config.py crypto_baremetal
|
||||
make CFLAGS="-O1 -Werror -I$PWD/tests/include/baremetal-override/"
|
||||
make CFLAGS="-O1 -Werror -I$PWD/framework/include/baremetal-override/"
|
||||
are_empty_libraries library/libmbedx509.* library/libmbedtls.*
|
||||
}
|
||||
support_build_crypto_baremetal () {
|
||||
@@ -2428,7 +2428,7 @@ support_build_crypto_baremetal () {
|
||||
component_build_baremetal () {
|
||||
msg "build: make, baremetal config"
|
||||
scripts/config.py baremetal
|
||||
make CFLAGS="-O1 -Werror -I$PWD/tests/include/baremetal-override/"
|
||||
make CFLAGS="-O1 -Werror -I$PWD/framework/include/baremetal-override/"
|
||||
}
|
||||
support_build_baremetal () {
|
||||
# Older Glibc versions include time.h from other headers such as stdlib.h,
|
||||
@@ -2538,7 +2538,7 @@ component_build_no_pk_rsa_alt_support () {
|
||||
scripts/config.py set MBEDTLS_X509_CRT_WRITE_C
|
||||
|
||||
# Only compile - this is primarily to test for compile issues
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../tests/include/alt-dummy'
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../framework/include/alt-dummy'
|
||||
}
|
||||
|
||||
component_build_module_alt () {
|
||||
@@ -2571,7 +2571,7 @@ component_build_module_alt () {
|
||||
|
||||
# We can only compile, not link, since we don't have any implementations
|
||||
# suitable for testing with the dummy alt headers.
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../tests/include/alt-dummy' lib
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../framework/include/alt-dummy' lib
|
||||
}
|
||||
|
||||
component_build_dhm_alt () {
|
||||
@@ -2582,7 +2582,7 @@ component_build_dhm_alt () {
|
||||
scripts/config.py unset MBEDTLS_DEBUG_C
|
||||
# We can only compile, not link, since we don't have any implementations
|
||||
# suitable for testing with the dummy alt headers.
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../tests/include/alt-dummy' lib
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../framework/include/alt-dummy' lib
|
||||
}
|
||||
|
||||
component_test_no_psa_crypto_full_cmake_asan() {
|
||||
@@ -3415,7 +3415,7 @@ component_test_tfm_config_p256m_driver_accel_ec () {
|
||||
common_tfm_config
|
||||
|
||||
# Build crypto library
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -I../tests/include/spe" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -I../framework/include/spe" LDFLAGS="$ASAN_CFLAGS"
|
||||
|
||||
# Make sure any built-in EC alg was not re-enabled by accident (additive config)
|
||||
not grep mbedtls_ecdsa_ library/ecdsa.o
|
||||
@@ -3449,7 +3449,7 @@ component_test_tfm_config() {
|
||||
echo "#undef MBEDTLS_PSA_P256M_DRIVER_ENABLED" >> "$CONFIG_H"
|
||||
|
||||
msg "build: TF-M config"
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../tests/include/spe' tests
|
||||
make CFLAGS='-Werror -Wall -Wextra -I../framework/include/spe' tests
|
||||
|
||||
# Check that p256m was not built
|
||||
not grep p256_ecdsa_ library/libmbedcrypto.a
|
||||
@@ -4187,7 +4187,7 @@ component_build_psa_accel_alg_ecdh() {
|
||||
scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
|
||||
scripts/config.py unset MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_ECDH -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_ECDH -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator HMAC code is in place and ready to test.
|
||||
@@ -4197,7 +4197,7 @@ component_build_psa_accel_alg_hmac() {
|
||||
scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO
|
||||
scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_HMAC -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_HMAC -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator HKDF code is in place and ready to test.
|
||||
@@ -4209,7 +4209,7 @@ component_build_psa_accel_alg_hkdf() {
|
||||
# Make sure to unset TLS1_3 since it requires HKDF_C and will not build properly without it.
|
||||
scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_HKDF -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_HKDF -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator MD5 code is in place and ready to test.
|
||||
@@ -4228,7 +4228,7 @@ component_build_psa_accel_alg_md5() {
|
||||
scripts/config.py unset MBEDTLS_LMS_C
|
||||
scripts/config.py unset MBEDTLS_LMS_PRIVATE
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_MD5 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_MD5 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RIPEMD160 code is in place and ready to test.
|
||||
@@ -4247,7 +4247,7 @@ component_build_psa_accel_alg_ripemd160() {
|
||||
scripts/config.py unset MBEDTLS_LMS_C
|
||||
scripts/config.py unset MBEDTLS_LMS_PRIVATE
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RIPEMD160 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RIPEMD160 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator SHA1 code is in place and ready to test.
|
||||
@@ -4266,7 +4266,7 @@ component_build_psa_accel_alg_sha1() {
|
||||
scripts/config.py unset MBEDTLS_LMS_C
|
||||
scripts/config.py unset MBEDTLS_LMS_PRIVATE
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_1 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_1 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator SHA224 code is in place and ready to test.
|
||||
@@ -4282,7 +4282,7 @@ component_build_psa_accel_alg_sha224() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_SHA_512
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_TLS12_ECJPAKE_TO_PMS
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_224 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_224 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator SHA256 code is in place and ready to test.
|
||||
@@ -4298,7 +4298,7 @@ component_build_psa_accel_alg_sha256() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_SHA_384
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_SHA_512
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_256 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_256 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator SHA384 code is in place and ready to test.
|
||||
@@ -4316,7 +4316,7 @@ component_build_psa_accel_alg_sha384() {
|
||||
scripts/config.py unset MBEDTLS_LMS_C
|
||||
scripts/config.py unset MBEDTLS_LMS_PRIVATE
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_384 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_384 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator SHA512 code is in place and ready to test.
|
||||
@@ -4335,7 +4335,7 @@ component_build_psa_accel_alg_sha512() {
|
||||
scripts/config.py unset MBEDTLS_LMS_C
|
||||
scripts/config.py unset MBEDTLS_LMS_PRIVATE
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_512 -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_SHA_512 -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RSA code is in place and ready to test.
|
||||
@@ -4349,7 +4349,7 @@ component_build_psa_accel_alg_rsa_pkcs1v15_crypt() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_OAEP
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_PSS
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_CRYPT -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RSA code is in place and ready to test.
|
||||
@@ -4363,7 +4363,7 @@ component_build_psa_accel_alg_rsa_pkcs1v15_sign() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_OAEP
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_PSS
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_PKCS1V15_SIGN -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RSA code is in place and ready to test.
|
||||
@@ -4377,7 +4377,7 @@ component_build_psa_accel_alg_rsa_oaep() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_PKCS1V15_SIGN
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_PSS
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_OAEP -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_OAEP -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RSA code is in place and ready to test.
|
||||
@@ -4391,7 +4391,7 @@ component_build_psa_accel_alg_rsa_pss() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_PKCS1V15_SIGN
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_RSA_OAEP
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_PSS -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_ALG_RSA_PSS -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RSA code is in place and ready to test.
|
||||
@@ -4406,7 +4406,7 @@ component_build_psa_accel_key_type_rsa_key_pair() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" set PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_EXPORT 1
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" set PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE 1
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_KEY_PAIR -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
# This should be renamed to test and updated once the accelerator RSA code is in place and ready to test.
|
||||
@@ -4418,7 +4418,7 @@ component_build_psa_accel_key_type_rsa_public_key() {
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" set PSA_WANT_ALG_RSA_PSS 1
|
||||
scripts/config.py -f "$CRYPTO_CONFIG_H" set PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY 1
|
||||
# Need to define the correct symbol and include the test driver header path in order to build with the test driver
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY -I../tests/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
make CC=$ASAN_CC CFLAGS="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST -DMBEDTLS_PSA_ACCEL_KEY_TYPE_RSA_PUBLIC_KEY -I../framework/include" LDFLAGS="$ASAN_CFLAGS"
|
||||
}
|
||||
|
||||
|
||||
@@ -4431,7 +4431,7 @@ component_build_tfm_armcc() {
|
||||
cp configs/config-tfm.h "$CONFIG_H"
|
||||
|
||||
msg "build: TF-M config, armclang armv7-m thumb2"
|
||||
armc6_build_test "--target=arm-arm-none-eabi -march=armv7-m -mthumb -Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wasm-operand-widths -Wunused -I../tests/include/spe"
|
||||
armc6_build_test "--target=arm-arm-none-eabi -march=armv7-m -mthumb -Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wasm-operand-widths -Wunused -I../framework/include/spe"
|
||||
}
|
||||
|
||||
component_build_tfm() {
|
||||
@@ -4443,11 +4443,11 @@ component_build_tfm() {
|
||||
cp configs/config-tfm.h "$CONFIG_H"
|
||||
|
||||
msg "build: TF-M config, clang, armv7-m thumb2"
|
||||
make lib CC="clang" CFLAGS="--target=arm-linux-gnueabihf -march=armv7-m -mthumb -Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wasm-operand-widths -Wunused -I../tests/include/spe"
|
||||
make lib CC="clang" CFLAGS="--target=arm-linux-gnueabihf -march=armv7-m -mthumb -Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wimplicit-fallthrough -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wasm-operand-widths -Wunused -I../framework/include/spe"
|
||||
|
||||
msg "build: TF-M config, gcc native build"
|
||||
make clean
|
||||
make lib CC="gcc" CFLAGS="-Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wformat-signedness -Wlogical-op -I../tests/include/spe"
|
||||
make lib CC="gcc" CFLAGS="-Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wformat-signedness -Wlogical-op -I../framework/include/spe"
|
||||
}
|
||||
|
||||
# Test that the given .o file builds with all (valid) combinations of the given options.
|
||||
@@ -5421,7 +5421,7 @@ component_test_psa_crypto_drivers () {
|
||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_CONFIG
|
||||
loc_cflags="$ASAN_CFLAGS -DPSA_CRYPTO_DRIVER_TEST_ALL"
|
||||
loc_cflags="${loc_cflags} '-DMBEDTLS_USER_CONFIG_FILE=\"../tests/configs/user-config-for-test.h\"'"
|
||||
loc_cflags="${loc_cflags} -I../tests/include -O2"
|
||||
loc_cflags="${loc_cflags} -I../framework/include -O2"
|
||||
|
||||
make CC=$ASAN_CC CFLAGS="${loc_cflags}" LDFLAGS="$ASAN_CFLAGS"
|
||||
|
||||
@@ -5551,8 +5551,8 @@ component_build_psa_alt_headers () {
|
||||
# Build the library and some programs.
|
||||
# Don't build the fuzzers to avoid having to go through hoops to set
|
||||
# a correct include path for programs/fuzz/Makefile.
|
||||
make CFLAGS="-I ../tests/include/alt-extra -DMBEDTLS_PSA_CRYPTO_PLATFORM_FILE='\"psa/crypto_platform_alt.h\"' -DMBEDTLS_PSA_CRYPTO_STRUCT_FILE='\"psa/crypto_struct_alt.h\"'" lib
|
||||
make -C programs -o fuzz CFLAGS="-I ../tests/include/alt-extra -DMBEDTLS_PSA_CRYPTO_PLATFORM_FILE='\"psa/crypto_platform_alt.h\"' -DMBEDTLS_PSA_CRYPTO_STRUCT_FILE='\"psa/crypto_struct_alt.h\"'"
|
||||
make CFLAGS="-I ../framework/include/alt-extra -DMBEDTLS_PSA_CRYPTO_PLATFORM_FILE='\"psa/crypto_platform_alt.h\"' -DMBEDTLS_PSA_CRYPTO_STRUCT_FILE='\"psa/crypto_struct_alt.h\"'" lib
|
||||
make -C programs -o fuzz CFLAGS="-I ../framework/include/alt-extra -DMBEDTLS_PSA_CRYPTO_PLATFORM_FILE='\"psa/crypto_platform_alt.h\"' -DMBEDTLS_PSA_CRYPTO_STRUCT_FILE='\"psa/crypto_struct_alt.h\"'"
|
||||
|
||||
# Check that we're getting the alternative include guards and not the
|
||||
# original include guards.
|
||||
|
@@ -243,7 +243,7 @@ class CodeParser():
|
||||
])
|
||||
all_macros["internal"] = self.parse_macros([
|
||||
"library/*.h",
|
||||
"tests/include/test/drivers/*.h",
|
||||
"framework/include/test/drivers/*.h",
|
||||
])
|
||||
all_macros["private"] = self.parse_macros([
|
||||
"library/*.c",
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* Functional testing of functions in the constant_time module.
|
||||
*
|
||||
* The tests are instrumented with #TEST_CF_SECRET and #TEST_CF_PUBLIC
|
||||
* (see tests/include/test/constant_flow.h) so that running the tests
|
||||
* (see framework/include/test/constant_flow.h) so that running the tests
|
||||
* under MSan or Valgrind will detect a non-constant-time implementation.
|
||||
*/
|
||||
|
||||
|
Reference in New Issue
Block a user