blob: 38348dda0e6a25846678bc6b20918a5e2ef2ab5b [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 Crone943bd72025-10-05 16:46:20 +0200182. Use the MBEDTLS_CONFIG_FILE and TF_PSA_CRYPTO_CONFIG_FILE CMake options. For
19 example, to build out-of-tree with the config-ccm-psk-tls1_2.h and
20 crypto-config-ccm-psk-tls1_2.h configuration pair:
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020021
Ronald Crone943bd72025-10-05 16:46:20 +020022 cmake -DMBEDTLS_CONFIG_FILE="configs/config-ccm-psk-tls1_2.h" \
23 -DTF_PSA_CRYPTO_CONFIG_FILE="configs/crypto-config-ccm-psk-tls1_2.h"
24 -B build-psktls12 .
25 cmake --build build-psktls12
Manuel Pégourié-Gonnard0bc1f232014-04-30 11:53:50 +020026
Ronald Cron0f2ef4a2025-09-30 18:30:32 +020027The second method also works if you want to keep your custom configuration
28files outside the Mbed TLS tree.