|
1 | 1 | This directory contains example configuration files. |
2 | 2 |
|
3 | | -The examples are generally focused on a particular usage case (eg, support for |
4 | | -a restricted number of ciphersuites) and aim at minimizing resource usage for |
5 | | -this target. They can be used as a basis for custom configurations. |
| 3 | +The examples are generally focused on a particular use case (eg, support for |
| 4 | +a restricted set of ciphersuites) and aim to minimize resource usage for |
| 5 | +the target. They can be used as a basis for custom configurations. |
6 | 6 |
|
7 | | -These files are complete replacements for the default mbedtls_config.h. To use one of |
8 | | -them, you can pick one of the following methods: |
| 7 | +These files come in pairs and are complete replacements for the default |
| 8 | +mbedtls_config.h and crypto_config.h. The two files of a pair share the same or |
| 9 | +very similar name, with the crypto file prefixed by "crypto-". Note |
| 10 | +that some of the cryptography configuration files may be located in |
| 11 | +tf-psa-crypto/configs. |
9 | 12 |
|
10 | | -1. Replace the default file include/mbedtls/mbedtls_config.h with the chosen one. |
| 13 | +To use one of these pairs, you can pick one of the following methods: |
11 | 14 |
|
12 | | -2. Define MBEDTLS_CONFIG_FILE and adjust the include path accordingly. |
13 | | - For example, using make: |
| 15 | +1. Replace the default files include/mbedtls/mbedtls_config.h and |
| 16 | + tf-psa-crypto/include/psa/crypto_config.h with the chosen ones. |
14 | 17 |
|
15 | | - CFLAGS="-I$PWD/configs -DMBEDTLS_CONFIG_FILE='<foo.h>'" make |
| 18 | +2. Use the MBEDTLS_CONFIG_FILE and TF_PSA_CRYPTO_CONFIG_FILE options of the |
| 19 | + CMake build system: |
16 | 20 |
|
17 | | - Or, using cmake: |
| 21 | + 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 |
18 | 24 |
|
19 | | - find . -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} + |
20 | | - CFLAGS="-I$PWD/configs -DMBEDTLS_CONFIG_FILE='<foo.h>'" cmake . |
21 | | - make |
22 | | - |
23 | | -Note that the second method also works if you want to keep your custom |
24 | | -configuration file outside the Mbed TLS tree. |
| 25 | +The second method also works if you want to keep your custom configuration |
| 26 | +files outside the Mbed TLS tree. |
0 commit comments