blob: 9e471344efcca85366563cc994f4fe772eb1add7 [file] [log] [blame]
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +02001This directory contains example configuration files.
2
Ronald Cron0f2ef4a2025-09-30 18:30:32 +02003The examples are generally focused on a particular use case (eg, support for
4a restricted set of ciphersuites) and aim to minimize resource usage for
5the target. They can be used as a basis for custom configurations.
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +02006
Ronald Cron0f2ef4a2025-09-30 18:30:32 +02007These files come in pairs and are complete replacements for the default
8mbedtls_config.h and crypto_config.h. The two files of a pair share the same or
9very similar name, with the crypto file prefixed by "crypto-". Note
10that some of the cryptography configuration files may be located in
11tf-psa-crypto/configs.
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020012
Ronald Cron0f2ef4a2025-09-30 18:30:32 +020013To use one of these pairs, you can pick one of the following methods:
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020014
Ronald Cron0f2ef4a2025-09-30 18:30:32 +0200151. Replace the default files include/mbedtls/mbedtls_config.h and
16 tf-psa-crypto/include/psa/crypto_config.h with the chosen ones.
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020017
Ronald Cron0f2ef4a2025-09-30 18:30:32 +0200182. Use the MBEDTLS_CONFIG_FILE and TF_PSA_CRYPTO_CONFIG_FILE options of the
19 CMake build system:
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020020
Ronald Cron0f2ef4a2025-09-30 18:30:32 +020021 cmake -DMBEDTLS_CONFIG_FILE="path-to-your-mbedtls-config-file" \
22 -DTF_PSA_CRYPTO_CONFIG_FILE="path-to-your-tf-psa-crypto-config-file" .
23 make
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020024
Ronald Cron0f2ef4a2025-09-30 18:30:32 +020025The second method also works if you want to keep your custom configuration
26files outside the Mbed TLS tree.