1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

crypto-client: simplify build of mbedtls static libraries

Instead of copying the entire library & include folders twice
to build libraries for client and server:

- change the main config file (mbedtls_config.h)
- build in the root library folder
- move the generated library in the psasim folder
- use those library for linking the client/server binaries

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti
2024-05-10 11:21:04 +02:00
parent 66fb1c17ff
commit cd89c1ffc8
4 changed files with 21 additions and 159 deletions

View File

@ -969,7 +969,7 @@ helper_crypto_client_build() {
scripts/config.py crypto_full
scripts/config.py unset MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS
scripts/config.py set MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER
scripts/config.py set MBEDTLS_PSA_CRYPTO_SPM
# scripts/config.py set MBEDTLS_PSA_CRYPTO_SPM
# Disable NV_SEED as the MBEDTLS_PLATFORM_STD_NV_SEED_FILE is not in
# right path for mbedtls_platform_std_nv_seed_read(). Just rely on
# mbedtls_platform_entropy_poll() as entropy source().
@ -977,7 +977,7 @@ helper_crypto_client_build() {
scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT
fi
make -C tests CC="$ASAN_CC" CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" $TARGET_LIB
make -C tests/psa-client-server/psasim/ CFLAGS="$ASAN_CFLAGS" LDFLAGS="$ASAN_CFLAGS" $TARGET_LIB
rm $CONFIG_H
mv $CONFIG_H.bak $CONFIG_H