mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-30 00:46:22 -04:00
Adapt test_full_no_cipher_ components
Adapt test_full_no_cipher_ components with MBEDTLS_PSA_CRYPTO_CONFIG enabled. Remove the component with no PSA crypto and the one with MBEDTLS_PSA_CRYPTO_CONFIG disabled. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
a67f1beb46
commit
8dbea48958
@ -1714,47 +1714,12 @@ component_test_crypto_full_md_light_only () {
|
|||||||
make test
|
make test
|
||||||
}
|
}
|
||||||
|
|
||||||
component_test_full_no_cipher_no_psa_crypto () {
|
component_test_full_no_cipher () {
|
||||||
msg "build: full no CIPHER no PSA_CRYPTO_C"
|
msg "build: full no CIPHER"
|
||||||
scripts/config.py full
|
|
||||||
scripts/config.py unset MBEDTLS_CIPHER_C
|
|
||||||
# Don't pull in cipher via PSA mechanisms
|
|
||||||
# (currently ignored anyway because we completely disable PSA)
|
|
||||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_CONFIG
|
|
||||||
# Disable features that depend on CIPHER_C
|
|
||||||
scripts/config.py unset MBEDTLS_CMAC_C
|
|
||||||
scripts/config.py unset MBEDTLS_NIST_KW_C
|
|
||||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_C
|
|
||||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_CLIENT
|
|
||||||
scripts/config.py unset MBEDTLS_SSL_TLS_C
|
|
||||||
scripts/config.py unset MBEDTLS_SSL_TICKET_C
|
|
||||||
# Disable features that depend on PSA_CRYPTO_C
|
|
||||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_SE_C
|
|
||||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_STORAGE_C
|
|
||||||
scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO
|
|
||||||
scripts/config.py unset MBEDTLS_LMS_C
|
|
||||||
scripts/config.py unset MBEDTLS_LMS_PRIVATE
|
|
||||||
|
|
||||||
msg "test: full no CIPHER no PSA_CRYPTO_C"
|
|
||||||
make test
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is a common configurator and test function that is used in:
|
|
||||||
# - component_test_full_no_cipher_with_psa_crypto
|
|
||||||
# - component_test_full_no_cipher_with_psa_crypto_config
|
|
||||||
# It accepts 2 input parameters:
|
|
||||||
# - $1: boolean value which basically reflects status of MBEDTLS_PSA_CRYPTO_CONFIG
|
|
||||||
# - $2: a text string which describes the test component
|
|
||||||
common_test_full_no_cipher_with_psa_crypto () {
|
|
||||||
USE_CRYPTO_CONFIG="$1"
|
|
||||||
COMPONENT_DESCRIPTION="$2"
|
|
||||||
|
|
||||||
msg "build: $COMPONENT_DESCRIPTION"
|
|
||||||
|
|
||||||
scripts/config.py full
|
scripts/config.py full
|
||||||
scripts/config.py unset MBEDTLS_CIPHER_C
|
scripts/config.py unset MBEDTLS_CIPHER_C
|
||||||
|
|
||||||
if [ "$USE_CRYPTO_CONFIG" -eq 1 ]; then
|
|
||||||
# The built-in implementation of the following algs/key-types depends
|
# The built-in implementation of the following algs/key-types depends
|
||||||
# on CIPHER_C so we disable them.
|
# on CIPHER_C so we disable them.
|
||||||
# This does not hold for KEY_TYPE_CHACHA20 and ALG_CHACHA20_POLY1305
|
# This does not hold for KEY_TYPE_CHACHA20 and ALG_CHACHA20_POLY1305
|
||||||
@ -1770,13 +1735,7 @@ common_test_full_no_cipher_with_psa_crypto () {
|
|||||||
scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128
|
scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_PBKDF2_AES_CMAC_PRF_128
|
||||||
scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_STREAM_CIPHER
|
scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_ALG_STREAM_CIPHER
|
||||||
scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DES
|
scripts/config.py -f $CRYPTO_CONFIG_H unset PSA_WANT_KEY_TYPE_DES
|
||||||
else
|
|
||||||
# Don't pull in cipher via PSA mechanisms
|
|
||||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_CONFIG
|
|
||||||
# Disable cipher modes/keys that make PSA depend on CIPHER_C.
|
|
||||||
# Keep CHACHA20 and CHACHAPOLY enabled since they do not depend on CIPHER_C.
|
|
||||||
scripts/config.py unset-all MBEDTLS_CIPHER_MODE
|
|
||||||
fi
|
|
||||||
# The following modules directly depends on CIPHER_C
|
# The following modules directly depends on CIPHER_C
|
||||||
scripts/config.py unset MBEDTLS_CMAC_C
|
scripts/config.py unset MBEDTLS_CMAC_C
|
||||||
scripts/config.py unset MBEDTLS_NIST_KW_C
|
scripts/config.py unset MBEDTLS_NIST_KW_C
|
||||||
@ -1786,18 +1745,10 @@ common_test_full_no_cipher_with_psa_crypto () {
|
|||||||
# Ensure that CIPHER_C was not re-enabled
|
# Ensure that CIPHER_C was not re-enabled
|
||||||
not grep mbedtls_cipher_init library/cipher.o
|
not grep mbedtls_cipher_init library/cipher.o
|
||||||
|
|
||||||
msg "test: $COMPONENT_DESCRIPTION"
|
msg "test: full no CIPHER"
|
||||||
make test
|
make test
|
||||||
}
|
}
|
||||||
|
|
||||||
component_test_full_no_cipher_with_psa_crypto() {
|
|
||||||
common_test_full_no_cipher_with_psa_crypto 0 "full no CIPHER no CRYPTO_CONFIG"
|
|
||||||
}
|
|
||||||
|
|
||||||
component_test_full_no_cipher_with_psa_crypto_config() {
|
|
||||||
common_test_full_no_cipher_with_psa_crypto 1 "full no CIPHER"
|
|
||||||
}
|
|
||||||
|
|
||||||
component_test_full_no_ccm() {
|
component_test_full_no_ccm() {
|
||||||
msg "build: full no PSA_WANT_ALG_CCM"
|
msg "build: full no PSA_WANT_ALG_CCM"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user