mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-07 06:42:56 +03:00
Merge pull request #6723 from mpg/restartable-vs-use-psa
Document ECP_RESTARTABLE and make it compatible with USE_PSA
This commit is contained in:
@@ -872,12 +872,6 @@ component_check_test_cases () {
|
||||
fi
|
||||
tests/scripts/check_test_cases.py $opt
|
||||
unset opt
|
||||
|
||||
# Check that no tests are explicitely disabled when USE_PSA_CRYPTO is set
|
||||
# as a matter of policy to ensure there is no missed testing
|
||||
msg "Check: explicitely disabled test with USE_PSA_CRYPTO" # < 1s
|
||||
not grep -n 'depends_on:.*!MBEDTLS_USE_PSA_CRYPTO' tests/suites/*.function tests/suites/*.data
|
||||
not grep -n '^ *requires_config_disabled.*MBEDTLS_USE_PSA_CRYPTO' tests/ssl-opt.sh tests/opt-testcases/*.sh
|
||||
}
|
||||
|
||||
component_check_doxygen_warnings () {
|
||||
@@ -1893,10 +1887,13 @@ component_test_depends_py_pkalgs_psa () {
|
||||
component_build_module_alt () {
|
||||
msg "build: MBEDTLS_XXX_ALT" # ~30s
|
||||
scripts/config.py full
|
||||
# Disable options that are incompatible with some ALT implementations.
|
||||
|
||||
# Disable options that are incompatible with some ALT implementations:
|
||||
# aesni.c and padlock.c reference mbedtls_aes_context fields directly.
|
||||
scripts/config.py unset MBEDTLS_AESNI_C
|
||||
scripts/config.py unset MBEDTLS_PADLOCK_C
|
||||
# MBEDTLS_ECP_RESTARTABLE is documented as incompatible.
|
||||
scripts/config.py unset MBEDTLS_ECP_RESTARTABLE
|
||||
# You can only have one threading implementation: alt or pthread, not both.
|
||||
scripts/config.py unset MBEDTLS_THREADING_PTHREAD
|
||||
# The SpecifiedECDomain parsing code accesses mbedtls_ecp_group fields
|
||||
@@ -1908,10 +1905,12 @@ component_build_module_alt () {
|
||||
# MBEDTLS_SHA512_*ALT can't be used with MBEDTLS_SHA512_USE_A64_CRYPTO_*
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_IF_PRESENT
|
||||
scripts/config.py unset MBEDTLS_SHA512_USE_A64_CRYPTO_ONLY
|
||||
|
||||
# Enable all MBEDTLS_XXX_ALT for whole modules. Do not enable
|
||||
# MBEDTLS_XXX_YYY_ALT which are for single functions.
|
||||
scripts/config.py set-all 'MBEDTLS_([A-Z0-9]*|NIST_KW)_ALT'
|
||||
scripts/config.py unset MBEDTLS_DHM_ALT #incompatible with 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 CC=gcc CFLAGS='-Werror -Wall -Wextra -I../tests/include/alt-dummy' lib
|
||||
@@ -1932,7 +1931,6 @@ component_test_no_use_psa_crypto_full_cmake_asan() {
|
||||
# full minus MBEDTLS_USE_PSA_CRYPTO: run the same set of tests as basic-build-test.sh
|
||||
msg "build: cmake, full config minus MBEDTLS_USE_PSA_CRYPTO, ASan"
|
||||
scripts/config.py full
|
||||
scripts/config.py set MBEDTLS_ECP_RESTARTABLE # not using PSA, so enable restartable ECC
|
||||
scripts/config.py unset MBEDTLS_PSA_CRYPTO_C
|
||||
scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO
|
||||
scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3
|
||||
@@ -1947,6 +1945,9 @@ component_test_no_use_psa_crypto_full_cmake_asan() {
|
||||
msg "test: main suites (full minus MBEDTLS_USE_PSA_CRYPTO)"
|
||||
make test
|
||||
|
||||
# Note: ssl-opt.sh has some test cases that depend on
|
||||
# MBEDTLS_ECP_RESTARTABLE && !MBEDTLS_USE_PSA_CRYPTO
|
||||
# This is the only component where those tests are not skipped.
|
||||
msg "test: ssl-opt.sh (full minus MBEDTLS_USE_PSA_CRYPTO)"
|
||||
tests/ssl-opt.sh
|
||||
|
||||
|
@@ -234,6 +234,7 @@ REVERSE_DEPENDENCIES = {
|
||||
'MBEDTLS_ECP_C': ['MBEDTLS_ECDSA_C',
|
||||
'MBEDTLS_ECDH_C',
|
||||
'MBEDTLS_ECJPAKE_C',
|
||||
'MBEDTLS_ECP_RESTARTABLE',
|
||||
'MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED',
|
||||
'MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED',
|
||||
'MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED',
|
||||
|
Reference in New Issue
Block a user