mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
all.sh: Keep only "test_block_cipher_no_decrypt_aesni" with PSA config
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@@ -2433,7 +2433,7 @@ component_test_aes_fewer_tables_and_rom_tables () {
|
|||||||
make test
|
make test
|
||||||
}
|
}
|
||||||
|
|
||||||
# helper for common_block_cipher_no_decrypt() which:
|
# helper for component_test_block_cipher_no_decrypt_aesni() which:
|
||||||
# - enable/disable the list of config options passed from -s/-u respectively.
|
# - enable/disable the list of config options passed from -s/-u respectively.
|
||||||
# - build
|
# - build
|
||||||
# - test for tests_suite_xxx
|
# - test for tests_suite_xxx
|
||||||
@@ -2487,13 +2487,32 @@ helper_block_cipher_no_decrypt_build_test () {
|
|||||||
programs/test/selftest
|
programs/test/selftest
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is a common configuration function used in:
|
# This is a configuration function used in component_test_block_cipher_no_decrypt_xxx:
|
||||||
# - component_test_block_cipher_no_decrypt_aesni_legacy()
|
config_block_cipher_no_decrypt () {
|
||||||
# - component_test_block_cipher_no_decrypt_aesni_use_psa()
|
scripts/config.py set MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
|
||||||
# in order to test BLOCK_CIPHER_NO_DECRYPT with AESNI intrinsics,
|
scripts/config.py unset MBEDTLS_CIPHER_MODE_XTS
|
||||||
# AESNI assembly and AES C implementation on x86_64 and with AESNI intrinsics
|
scripts/config.py unset MBEDTLS_NIST_KW_C
|
||||||
# on x86.
|
|
||||||
common_block_cipher_no_decrypt () {
|
# Enable support for cryptographic mechanisms through the PSA API.
|
||||||
|
# Note: XTS, KW are not yet supported via the PSA API in Mbed TLS.
|
||||||
|
scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG
|
||||||
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CBC_NO_PADDING
|
||||||
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CBC_PKCS7
|
||||||
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_ECB_NO_PADDING
|
||||||
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_KEY_TYPE_DES
|
||||||
|
# Note: The three unsets below are to be removed for Mbed TLS 4.0
|
||||||
|
scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC
|
||||||
|
scripts/config.py unset MBEDTLS_DES_C
|
||||||
|
}
|
||||||
|
|
||||||
|
component_test_block_cipher_no_decrypt_aesni () {
|
||||||
|
# Test BLOCK_CIPHER_NO_DECRYPT with AESNI intrinsics, AESNI assembly and
|
||||||
|
# AES C implementation on x86_64 and with AESNI intrinsics on x86.
|
||||||
|
|
||||||
|
# This consistently causes an llvm crash on clang 3.8, so use gcc
|
||||||
|
export CC=gcc
|
||||||
|
config_block_cipher_no_decrypt
|
||||||
|
|
||||||
# test AESNI intrinsics
|
# test AESNI intrinsics
|
||||||
helper_block_cipher_no_decrypt_build_test \
|
helper_block_cipher_no_decrypt_build_test \
|
||||||
-s "MBEDTLS_AESNI_C" \
|
-s "MBEDTLS_AESNI_C" \
|
||||||
@@ -2515,43 +2534,6 @@ common_block_cipher_no_decrypt () {
|
|||||||
-l "-m32"
|
-l "-m32"
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is a configuration function used in component_test_block_cipher_no_decrypt_xxx:
|
|
||||||
# usage: 0: no PSA crypto configuration
|
|
||||||
# 1: use PSA crypto configuration
|
|
||||||
config_block_cipher_no_decrypt () {
|
|
||||||
use_psa=$1
|
|
||||||
|
|
||||||
scripts/config.py set MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
|
|
||||||
scripts/config.py unset MBEDTLS_CIPHER_MODE_CBC
|
|
||||||
scripts/config.py unset MBEDTLS_CIPHER_MODE_XTS
|
|
||||||
scripts/config.py unset MBEDTLS_DES_C
|
|
||||||
scripts/config.py unset MBEDTLS_NIST_KW_C
|
|
||||||
|
|
||||||
if [ "$use_psa" -eq 1 ]; then
|
|
||||||
# Enable support for cryptographic mechanisms through the PSA API.
|
|
||||||
# Note: XTS, KW are not yet supported via the PSA API in Mbed TLS.
|
|
||||||
scripts/config.py set MBEDTLS_PSA_CRYPTO_CONFIG
|
|
||||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CBC_NO_PADDING
|
|
||||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_CBC_PKCS7
|
|
||||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_ECB_NO_PADDING
|
|
||||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_KEY_TYPE_DES
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
component_test_block_cipher_no_decrypt_aesni () {
|
|
||||||
# This consistently causes an llvm crash on clang 3.8, so use gcc
|
|
||||||
export CC=gcc
|
|
||||||
config_block_cipher_no_decrypt 0
|
|
||||||
common_block_cipher_no_decrypt
|
|
||||||
}
|
|
||||||
|
|
||||||
component_test_block_cipher_no_decrypt_aesni_use_psa () {
|
|
||||||
# This consistently causes an llvm crash on clang 3.8, so use gcc
|
|
||||||
export CC=gcc
|
|
||||||
config_block_cipher_no_decrypt 1
|
|
||||||
common_block_cipher_no_decrypt
|
|
||||||
}
|
|
||||||
|
|
||||||
support_test_block_cipher_no_decrypt_aesce_armcc () {
|
support_test_block_cipher_no_decrypt_aesce_armcc () {
|
||||||
support_build_armcc
|
support_build_armcc
|
||||||
}
|
}
|
||||||
@@ -2571,7 +2553,7 @@ component_test_block_cipher_no_decrypt_aesce_armcc () {
|
|||||||
scripts/config.py unset MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
scripts/config.py unset MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT
|
||||||
scripts/config.py set MBEDTLS_HAVE_ASM
|
scripts/config.py set MBEDTLS_HAVE_ASM
|
||||||
|
|
||||||
config_block_cipher_no_decrypt 1
|
config_block_cipher_no_decrypt
|
||||||
|
|
||||||
# test AESCE baremetal build
|
# test AESCE baremetal build
|
||||||
scripts/config.py set MBEDTLS_AESCE_C
|
scripts/config.py set MBEDTLS_AESCE_C
|
||||||
|
Reference in New Issue
Block a user