mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-06 19:13:37 +00:00
Merge pull request #9832 from ronald-cron-arm/finalize-split-preparation-2_3.6
Move test_keys.h to include/test
This commit is contained in:
commit
4497d5f39a
@ -354,18 +354,18 @@ if(ENABLE_TESTING OR ENABLE_PROGRAMS)
|
|||||||
if(GEN_FILES)
|
if(GEN_FILES)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/test_keys.h
|
${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include/test/test_keys.h
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tests
|
${CMAKE_CURRENT_SOURCE_DIR}/tests
|
||||||
COMMAND
|
COMMAND
|
||||||
"${MBEDTLS_PYTHON_EXECUTABLE}"
|
"${MBEDTLS_PYTHON_EXECUTABLE}"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py"
|
"${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py"
|
||||||
"--output"
|
"--output"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/test_keys.h"
|
"${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include/test/test_keys.h"
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py
|
${CMAKE_CURRENT_SOURCE_DIR}/framework/scripts/generate_test_keys.py
|
||||||
)
|
)
|
||||||
add_custom_target(test_keys_header DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/src/test_keys.h)
|
add_custom_target(test_keys_header DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/framework/tests/include/test/test_keys.h)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_certs.h
|
${CMAKE_CURRENT_SOURCE_DIR}/tests/src/test_certs.h
|
||||||
|
2
Makefile
2
Makefile
@ -91,6 +91,8 @@ visualc_files: $(VISUALC_FILES)
|
|||||||
# present before it runs. It doesn't matter if the files aren't up-to-date,
|
# present before it runs. It doesn't matter if the files aren't up-to-date,
|
||||||
# they just need to be present.
|
# they just need to be present.
|
||||||
$(VISUALC_FILES): | library/generated_files
|
$(VISUALC_FILES): | library/generated_files
|
||||||
|
$(VISUALC_FILES): | programs/generated_files
|
||||||
|
$(VISUALC_FILES): | tests/generated_files
|
||||||
$(VISUALC_FILES): $(gen_file_dep) scripts/generate_visualc_files.pl
|
$(VISUALC_FILES): $(gen_file_dep) scripts/generate_visualc_files.pl
|
||||||
$(VISUALC_FILES): $(gen_file_dep) scripts/data_files/vs2017-app-template.vcxproj
|
$(VISUALC_FILES): $(gen_file_dep) scripts/data_files/vs2017-app-template.vcxproj
|
||||||
$(VISUALC_FILES): $(gen_file_dep) scripts/data_files/vs2017-main-template.vcxproj
|
$(VISUALC_FILES): $(gen_file_dep) scripts/data_files/vs2017-main-template.vcxproj
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit beb5dadbf26156f434ea58dce5c5a3182df4c60f
|
Subproject commit ff4c33600afc0def98d190f7d10210370f47bd9f
|
@ -26,6 +26,6 @@ python framework\scripts\generate_bignum_tests.py || exit /b 1
|
|||||||
python framework\scripts\generate_config_tests.py || exit /b 1
|
python framework\scripts\generate_config_tests.py || exit /b 1
|
||||||
python framework\scripts\generate_ecp_tests.py || exit /b 1
|
python framework\scripts\generate_ecp_tests.py || exit /b 1
|
||||||
python framework\scripts\generate_psa_tests.py || exit /b 1
|
python framework\scripts\generate_psa_tests.py || exit /b 1
|
||||||
python framework\scripts\generate_test_keys.py --output framework\tests\src\test_keys.h || exit /b 1
|
python framework\scripts\generate_test_keys.py --output framework\tests\include\test\test_keys.h || exit /b 1
|
||||||
python framework\scripts\generate_test_cert_macros.py --output tests\src\test_certs.h || exit /b 1
|
python framework\scripts\generate_test_cert_macros.py --output tests\src\test_certs.h || exit /b 1
|
||||||
python framework\scripts\generate_tls13_compat_tests.py || exit /b 1
|
python framework\scripts\generate_tls13_compat_tests.py || exit /b 1
|
||||||
|
@ -53,7 +53,7 @@ endif
|
|||||||
GENERATED_DATA_FILES += $(GENERATED_PSA_DATA_FILES)
|
GENERATED_DATA_FILES += $(GENERATED_PSA_DATA_FILES)
|
||||||
|
|
||||||
GENERATED_FILES = $(GENERATED_DATA_FILES)
|
GENERATED_FILES = $(GENERATED_DATA_FILES)
|
||||||
GENERATED_FILES += ../framework/tests/src/test_keys.h src/test_certs.h
|
GENERATED_FILES += ../framework/tests/include/test/test_keys.h src/test_certs.h
|
||||||
|
|
||||||
# Generated files needed to (fully) run ssl-opt.sh
|
# Generated files needed to (fully) run ssl-opt.sh
|
||||||
.PHONY: ssl-opt
|
.PHONY: ssl-opt
|
||||||
@ -161,7 +161,7 @@ src/test_certs.h: ../framework/scripts/generate_test_cert_macros.py \
|
|||||||
echo " Gen $@"
|
echo " Gen $@"
|
||||||
$(PYTHON) ../framework/scripts/generate_test_cert_macros.py --output $@
|
$(PYTHON) ../framework/scripts/generate_test_cert_macros.py --output $@
|
||||||
|
|
||||||
../framework/tests/src/test_keys.h: ../framework/scripts/generate_test_keys.py
|
../framework/tests/include/test/test_keys.h: ../framework/scripts/generate_test_keys.py
|
||||||
echo " Gen $@"
|
echo " Gen $@"
|
||||||
$(PYTHON) ../framework/scripts/generate_test_keys.py --output $@
|
$(PYTHON) ../framework/scripts/generate_test_keys.py --output $@
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ ifdef RECORD_PSA_STATUS_COVERAGE_LOG
|
|||||||
# therefore the wildcard enumeration above doesn't include it.
|
# therefore the wildcard enumeration above doesn't include it.
|
||||||
TEST_OBJS_DEPS += ../framework/tests/include/test/instrument_record_status.h
|
TEST_OBJS_DEPS += ../framework/tests/include/test/instrument_record_status.h
|
||||||
endif
|
endif
|
||||||
TEST_OBJS_DEPS += src/test_certs.h ../framework/tests/src/test_keys.h
|
TEST_OBJS_DEPS += src/test_certs.h ../framework/tests/include/test/test_keys.h
|
||||||
|
|
||||||
# Rule to compile common test C files in framework
|
# Rule to compile common test C files in framework
|
||||||
../framework/tests/src/%.o : ../framework/tests/src/%.c $(TEST_OBJS_DEPS)
|
../framework/tests/src/%.o : ../framework/tests/src/%.c $(TEST_OBJS_DEPS)
|
||||||
|
@ -126,7 +126,7 @@ check framework/scripts/generate_bignum_tests.py $(framework/scripts/generate_bi
|
|||||||
check framework/scripts/generate_config_tests.py $(framework/scripts/generate_config_tests.py --list)
|
check framework/scripts/generate_config_tests.py $(framework/scripts/generate_config_tests.py --list)
|
||||||
check framework/scripts/generate_ecp_tests.py $(framework/scripts/generate_ecp_tests.py --list)
|
check framework/scripts/generate_ecp_tests.py $(framework/scripts/generate_ecp_tests.py --list)
|
||||||
check framework/scripts/generate_psa_tests.py $(framework/scripts/generate_psa_tests.py --list)
|
check framework/scripts/generate_psa_tests.py $(framework/scripts/generate_psa_tests.py --list)
|
||||||
check framework/scripts/generate_test_keys.py framework/tests/src/test_keys.h
|
check framework/scripts/generate_test_keys.py framework/tests/include/test/test_keys.h
|
||||||
check scripts/generate_driver_wrappers.py $library_dir/psa_crypto_driver_wrappers.h $library_dir/psa_crypto_driver_wrappers_no_static.c
|
check scripts/generate_driver_wrappers.py $library_dir/psa_crypto_driver_wrappers.h $library_dir/psa_crypto_driver_wrappers_no_static.c
|
||||||
|
|
||||||
# Additional checks for Mbed TLS only
|
# Additional checks for Mbed TLS only
|
||||||
|
@ -181,7 +181,7 @@
|
|||||||
#define MBEDTLS_MD_ALG_FOR_TEST MBEDTLS_MD_SHA512
|
#define MBEDTLS_MD_ALG_FOR_TEST MBEDTLS_MD_SHA512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <../src/test_keys.h>
|
#include <test/test_keys.h>
|
||||||
|
|
||||||
/* Define an RSA key size we know it's present in predefined_key[] array. */
|
/* Define an RSA key size we know it's present in predefined_key[] array. */
|
||||||
#define RSA_KEY_SIZE 1024
|
#define RSA_KEY_SIZE 1024
|
||||||
@ -243,7 +243,7 @@ static psa_status_t pk_psa_import_key(const unsigned char *key_data, size_t key_
|
|||||||
|
|
||||||
/** Setup the provided PK context.
|
/** Setup the provided PK context.
|
||||||
*
|
*
|
||||||
* Predefined keys used for the setup are taken from "test/src/test_keys.h"
|
* Predefined keys used for the setup are taken from <test/test_keys.h>
|
||||||
* which is automatically generated using "framework/scripts/generate_test_keys.py".
|
* which is automatically generated using "framework/scripts/generate_test_keys.py".
|
||||||
*
|
*
|
||||||
* \param pk The PK object to fill. It must have been initialized
|
* \param pk The PK object to fill. It must have been initialized
|
||||||
|
Loading…
x
Reference in New Issue
Block a user