mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-05-10 00:49:04 +08:00
Adjust more paths to PSA headers
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
parent
1451a76958
commit
7e5d61c41a
@ -27,7 +27,7 @@ set -eu
|
|||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
make clean
|
make clean
|
||||||
git checkout -- include/mbedtls/mbedtls_config.h include/psa/crypto_config.h
|
git checkout -- include/mbedtls/mbedtls_config.h tf-psa-crypto/include/psa/crypto_config.h
|
||||||
}
|
}
|
||||||
|
|
||||||
record() {
|
record() {
|
||||||
|
@ -37,10 +37,16 @@ print_cpp () {
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for header in include/mbedtls/*.h include/psa/*.h; do
|
for header in include/mbedtls/*.h; do
|
||||||
case ${header#include/} in
|
case ${header#include/} in
|
||||||
mbedtls/mbedtls_config.h) :;; # not meant for direct inclusion
|
mbedtls/mbedtls_config.h) :;; # not meant for direct inclusion
|
||||||
mbedtls/config_*.h) :;; # not meant for direct inclusion
|
mbedtls/config_*.h) :;; # not meant for direct inclusion
|
||||||
|
*) echo "#include \"${header#include/}\"";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
for header in tf-psa-crypto/include/psa/*.h; do
|
||||||
|
case ${header#tf-psa-crypto/include/} in
|
||||||
psa/crypto_config.h) :;; # not meant for direct inclusion
|
psa/crypto_config.h) :;; # not meant for direct inclusion
|
||||||
psa/crypto_ajdust_config*.h) :;; # not meant for direct inclusion
|
psa/crypto_ajdust_config*.h) :;; # not meant for direct inclusion
|
||||||
# Some of the psa/crypto_*.h headers are not meant to be included
|
# Some of the psa/crypto_*.h headers are not meant to be included
|
||||||
@ -48,7 +54,7 @@ EOF
|
|||||||
# psa/crypto.h has been included before. Since psa/crypto.h comes
|
# psa/crypto.h has been included before. Since psa/crypto.h comes
|
||||||
# before psa/crypto_*.h in the wildcard enumeration, we don't need
|
# before psa/crypto_*.h in the wildcard enumeration, we don't need
|
||||||
# to skip those headers.
|
# to skip those headers.
|
||||||
*) echo "#include \"${header#include/}\"";;
|
*) echo "#include \"${header#tf-psa-crypto/include/}\"";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ TFM_MEDIUM_CONFIG_H = 'configs/ext/tfm_mbedcrypto_config_profile_medium.h'
|
|||||||
TFM_MEDIUM_CRYPTO_CONFIG_H = 'configs/ext/crypto_config_profile_medium.h'
|
TFM_MEDIUM_CRYPTO_CONFIG_H = 'configs/ext/crypto_config_profile_medium.h'
|
||||||
|
|
||||||
CONFIG_H = 'include/mbedtls/mbedtls_config.h'
|
CONFIG_H = 'include/mbedtls/mbedtls_config.h'
|
||||||
CRYPTO_CONFIG_H = 'include/psa/crypto_config.h'
|
CRYPTO_CONFIG_H = 'tf-psa-crypto/include/psa/crypto_config.h'
|
||||||
BACKUP_SUFFIX = '.code_size.bak'
|
BACKUP_SUFFIX = '.code_size.bak'
|
||||||
|
|
||||||
class CodeSizeBuildInfo: # pylint: disable=too-few-public-methods
|
class CodeSizeBuildInfo: # pylint: disable=too-few-public-methods
|
||||||
|
@ -133,10 +133,11 @@ pre_check_environment () {
|
|||||||
pre_initialize_variables () {
|
pre_initialize_variables () {
|
||||||
if in_mbedtls_repo; then
|
if in_mbedtls_repo; then
|
||||||
CONFIG_H='include/mbedtls/mbedtls_config.h'
|
CONFIG_H='include/mbedtls/mbedtls_config.h'
|
||||||
|
CRYPTO_CONFIG_H='tf-psa-crypto/include/psa/crypto_config.h'
|
||||||
else
|
else
|
||||||
CONFIG_H='drivers/builtin/include/mbedtls/mbedtls_config.h'
|
CONFIG_H='drivers/builtin/include/mbedtls/mbedtls_config.h'
|
||||||
|
CRYPTO_CONFIG_H='include/psa/crypto_config.h'
|
||||||
fi
|
fi
|
||||||
CRYPTO_CONFIG_H='include/psa/crypto_config.h'
|
|
||||||
CONFIG_TEST_DRIVER_H='tests/include/test/drivers/config_test_driver.h'
|
CONFIG_TEST_DRIVER_H='tests/include/test/drivers/config_test_driver.h'
|
||||||
|
|
||||||
# Files that are clobbered by some jobs will be backed up. Use a different
|
# Files that are clobbered by some jobs will be backed up. Use a different
|
||||||
@ -3227,7 +3228,7 @@ config_psa_crypto_config_accel_ecc_ffdh_no_bignum() {
|
|||||||
if [ "$test_target" = "ECC" ]; then
|
if [ "$test_target" = "ECC" ]; then
|
||||||
# When testing ECC only, we disable FFDH support, both from builtin and
|
# When testing ECC only, we disable FFDH support, both from builtin and
|
||||||
# PSA sides, and also disable the key exchanges that depend on DHM.
|
# PSA sides, and also disable the key exchanges that depend on DHM.
|
||||||
scripts/config.py -f include/psa/crypto_config.h unset PSA_WANT_ALG_FFDH
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset PSA_WANT_ALG_FFDH
|
||||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset-all "PSA_WANT_KEY_TYPE_DH_[0-9A-Z_a-z]*"
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset-all "PSA_WANT_KEY_TYPE_DH_[0-9A-Z_a-z]*"
|
||||||
scripts/config.py -f "$CRYPTO_CONFIG_H" unset-all "PSA_WANT_DH_RFC7919_[0-9]*"
|
scripts/config.py -f "$CRYPTO_CONFIG_H" unset-all "PSA_WANT_DH_RFC7919_[0-9]*"
|
||||||
scripts/config.py unset MBEDTLS_DHM_C
|
scripts/config.py unset MBEDTLS_DHM_C
|
||||||
|
@ -74,7 +74,8 @@ def main(library_build_dir: str):
|
|||||||
os.chdir(build_dir)
|
os.chdir(build_dir)
|
||||||
|
|
||||||
extra_includes = (';{}/drivers/builtin/include'.format(root_dir)
|
extra_includes = (';{}/drivers/builtin/include'.format(root_dir)
|
||||||
if in_tf_psa_crypto_repo else '')
|
if in_tf_psa_crypto_repo else
|
||||||
|
';{}/tf-psa-crypto/include'.format(root_dir))
|
||||||
|
|
||||||
#pylint: disable=bad-continuation
|
#pylint: disable=bad-continuation
|
||||||
subprocess.check_call([
|
subprocess.check_call([
|
||||||
|
@ -161,7 +161,7 @@ TEST_SUITES = ['tests/suites/test_suite_psa_crypto_metadata.data']
|
|||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description=globals()['__doc__'])
|
parser = argparse.ArgumentParser(description=globals()['__doc__'])
|
||||||
parser.add_argument('--include', '-I',
|
parser.add_argument('--include', '-I',
|
||||||
action='append', default=['include'],
|
action='append', default=['tf-psa-crypto/include', 'include'],
|
||||||
help='Directory for header files')
|
help='Directory for header files')
|
||||||
parser.add_argument('--keep-c',
|
parser.add_argument('--keep-c',
|
||||||
action='store_true', dest='keep_c', default=False,
|
action='store_true', dest='keep_c', default=False,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user