Skip to content

Commit 0f2ef4a

Browse files
README.md: Update Configuration section
Signed-off-by: Ronald Cron <[email protected]>
1 parent eef87b3 commit 0f2ef4a

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ Mbed TLS includes the [TF-PSA-Crypto repository](https://github.com/Mbed-TLS/TF-
66

77
Configuration
88
-------------
9+
Configuration options related to X.509 and TLS are available in `include/mbedtls/mbedtls_config.h`, while cryptography and platform options are located in the TF-PSA-Crypto configuration file `tf-psa-crypto/include/psa/crypto_config.h`.
910

10-
Mbed TLS should build out of the box on most systems. Some platform specific options are available in the fully documented configuration file `include/mbedtls/mbedtls_config.h`, which is also the place where features can be selected. This file can be edited manually, or in a more programmatic way using the Python 3 script `scripts/config.py` (use `--help` for usage instructions).
11+
With the default platform options, Mbed TLS should build out of the box on most systems.
1112

12-
Compiler options can be set using conventional environment variables such as `CC` and `CFLAGS`.
13+
These configuration files can be edited manually, or programmatically using the Python 3 script scripts/config.py (run with --help for usage instructions).
1314

14-
We provide some non-standard configurations focused on specific use cases in the `configs/` directory. You can read more about those in `configs/README.txt`
15+
We provide some non-standard configurations focused on specific use cases in the `configs/` directory. You can read more about those in `configs/README.txt`.
1516

1617
Documentation
1718
-------------

configs/README.txt

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
This directory contains example configuration files.
22

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.
66

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.
912

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:
1114

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.
1417

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:
1620

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
1824

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

Comments
 (0)