mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 09:15:43 +01:00
Test MBEDTLS_PSA_CRYPTO_CONFIG_FILE and MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
036a9bb92b
commit
690a2ef13c
@ -2638,6 +2638,26 @@ component_build_mbedtls_config_file () {
|
|||||||
rm -f user_config.h full_config.h
|
rm -f user_config.h full_config.h
|
||||||
}
|
}
|
||||||
|
|
||||||
|
component_build_psa_config_file () {
|
||||||
|
msg "build: make with MBEDTLS_PSA_CRYPTO_CONFIG_FILE" # ~40s
|
||||||
|
scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG
|
||||||
|
cp "$CRYPTO_CONFIG_H" psa_test_config.h
|
||||||
|
echo '#error "MBEDTLS_PSA_CRYPTO_CONFIG_FILE is not working"' >"$CRYPTO_CONFIG_H"
|
||||||
|
make CFLAGS="-I '$PWD' -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE='\"psa_test_config.h\"'"
|
||||||
|
programs/test/query_compile_time_config MBEDTLS_CMAC_C
|
||||||
|
make clean
|
||||||
|
|
||||||
|
msg "build: make with MBEDTLS_PSA_CRYPTO_CONFIG_FILE + MBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE" # ~40s
|
||||||
|
# In the user config, disable one feature, which will reflect on the
|
||||||
|
# mbedtls configuration so we can query it with query_compile_time_config.
|
||||||
|
echo '#undef PSA_WANT_ALG_CMAC' >psa_user_config.h
|
||||||
|
scripts/config.py unset MBEDTLS_CMAC_C
|
||||||
|
make CFLAGS="-I '$PWD' -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE='\"psa_test_config.h\"' -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE='\"psa_user_config.h\"'"
|
||||||
|
not programs/test/query_compile_time_config MBEDTLS_CMAC_C
|
||||||
|
|
||||||
|
rm -f psa_test_config.h psa_user_config.h
|
||||||
|
}
|
||||||
|
|
||||||
component_test_m32_o0 () {
|
component_test_m32_o0 () {
|
||||||
# Build without optimization, so as to use portable C code (in a 32-bit
|
# Build without optimization, so as to use portable C code (in a 32-bit
|
||||||
# build) and not the i386-specific inline assembly.
|
# build) and not the i386-specific inline assembly.
|
||||||
|
Loading…
Reference in New Issue
Block a user