mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Rename config.h to mbedtls_config.h
This commit was generated using the following script: # ======================== #!/bin/sh git ls-files | grep -v '^ChangeLog' | xargs sed -b -E -i ' s/((check|crypto|full|mbedtls|query)_config)\.h/\1\nh/g s/config\.h/mbedtls_config.h/g y/\n/./ ' mv include/mbedtls/config.h include/mbedtls/mbedtls_config.h # ======================== Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Remove 3DES ciphersuites
|
||||
--
|
||||
|
||||
This change does not affect users using default settings for 3DES in `config.h`
|
||||
This change does not affect users using default settings for 3DES in `mbedtls_config.h`
|
||||
because the 3DES ciphersuites were disabled by that.
|
||||
|
||||
3DES has weaknesses/limitations and there are better alternatives, and more and
|
||||
|
@@ -1,10 +1,10 @@
|
||||
Combine the `MBEDTLS_SSL_CID_PADDING_GRANULARITY` and `MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY` options
|
||||
--
|
||||
|
||||
This change affects users who modified the default `config.h` padding granularity
|
||||
This change affects users who modified the default `mbedtls_config.h` padding granularity
|
||||
settings, i.e. enabled at least one of the options.
|
||||
|
||||
The `config.h` options `MBEDTLS_SSL_CID_PADDING_GRANULARITY` and
|
||||
The `mbedtls_config.h` options `MBEDTLS_SSL_CID_PADDING_GRANULARITY` and
|
||||
`MBEDTLS_SSL_TLS1_3_PADDING_GRANULARITY` were combined into one option because
|
||||
they used exactly the same padding mechanism and hence their respective padding
|
||||
granularities can be used in exactly the same way. This change simplifies the
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Replaced MBEDTLS_SHA512_NO_SHA384 with MBEDTLS_SHA384_C
|
||||
------------------------------------------------------
|
||||
|
||||
This does not affect users who use the default `config.h`.
|
||||
This does not affect users who use the default `mbedtls_config.h`.
|
||||
MBEDTLS_SHA512_NO_SHA384 was disabled by default, now MBEDTLS_SHA384_C is
|
||||
enabled by default.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Remove the configuration to enable weak ciphersuites in SSL / TLS
|
||||
-----------------------------------------------------------------
|
||||
|
||||
This does not affect users who use the default `config.h`, as this option was
|
||||
This does not affect users who use the default `mbedtls_config.h`, as this option was
|
||||
already off by default.
|
||||
|
||||
If you were using a weak cipher, please switch to any of the modern,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Remove the option to build the library without any entropy sources
|
||||
------------------------------------------------------------------
|
||||
|
||||
This does not affect users who use the default `config.h`, as this option was
|
||||
This does not affect users who use the default `mbedtls_config.h`, as this option was
|
||||
already off by default.
|
||||
|
||||
If you were using the `MBEDTLS_TEST_NULL_ENTROPY` option and your platform
|
||||
|
@@ -1,4 +1,4 @@
|
||||
Remove `MBEDTLS_X509_CHECK_*_KEY_USAGE` options from `config.h`
|
||||
Remove `MBEDTLS_X509_CHECK_*_KEY_USAGE` options from `mbedtls_config.h`
|
||||
-------------------------------------------------------------------
|
||||
|
||||
This change affects users who have chosen the configuration options to disable the
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Remove MBEDTLS_SSL_DTLS_BADMAC_LIMIT option
|
||||
-------------------------------------------
|
||||
|
||||
This change does not affect users who used the default `config.h`, as the option
|
||||
This change does not affect users who used the default `mbedtls_config.h`, as the option
|
||||
MBEDTLS_SSL_DTLS_BADMAC_LIMIT was already on by default.
|
||||
|
||||
This option was a trade-off between functionality and code size: it allowed
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Remove MBEDTLS_SSL_RECORD_CHECKING option and enable its action by default
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
This change does not affect users who use the default config.h, as the
|
||||
This change does not affect users who use the default mbedtls_config.h, as the
|
||||
option MBEDTLS_SSL_RECORD_CHECKING was already on by default.
|
||||
|
||||
This option was added only to control compilation of one function,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Separated MBEDTLS_SHA224_C and MBEDTLS_SHA256_C
|
||||
-----------------------------------------------------------------
|
||||
|
||||
This does not affect users who use the default `config.h`. MBEDTLS_SHA256_C
|
||||
This does not affect users who use the default `mbedtls_config.h`. MBEDTLS_SHA256_C
|
||||
was enabled by default. Now both MBEDTLS_SHA256_C and MBEDTLS_SHA224_C are
|
||||
enabled.
|
||||
|
||||
|
@@ -2,7 +2,7 @@ Turn MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE configuration option into a runti
|
||||
--
|
||||
|
||||
This change affects users who were enabling MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
|
||||
option in the `config.h`
|
||||
option in the `mbedtls_config.h`
|
||||
|
||||
This option has been removed and a new function with similar functionality has
|
||||
been introduced into the SSL API.
|
||||
|
@@ -139,7 +139,7 @@ avoid variants of the CRIME and BREACH attacks.
|
||||
Remove support for TLS RC4-based ciphersuites
|
||||
---------------------------------------------
|
||||
|
||||
This does not affect people who used the default `config.h` and the default
|
||||
This does not affect people who used the default `mbedtls_config.h` and the default
|
||||
list of ciphersuites, as RC4-based ciphersuites were already not negotiated in
|
||||
that case.
|
||||
|
||||
|
@@ -51,7 +51,7 @@ The outcome file is in a CSV format using `;` (semicolon) as the delimiter and n
|
||||
The outcome file has 6 fields:
|
||||
|
||||
* **Platform**: a description of the platform, e.g. `Linux-x86_64` or `Linux-x86_64-gcc7-msan`.
|
||||
* **Configuration**: a unique description of the configuration (`config.h`).
|
||||
* **Configuration**: a unique description of the configuration (`mbedtls_config.h`).
|
||||
* **Test suite**: `test_suite_xxx` or `ssl-opt`.
|
||||
* **Test case**: the description of the test case.
|
||||
* **Result**: one of `PASS`, `SKIP` or `FAIL`.
|
||||
|
@@ -15,7 +15,7 @@ MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL
|
||||
This macro will likely be renamed to `MBEDTLS_SSL_PROTO_TLS1_3` once a minimal viable
|
||||
implementation of the TLS 1.3 protocol is available.
|
||||
|
||||
See the [documentation of `MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL`](../../include/mbedtls/config.h)
|
||||
See the [documentation of `MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL`](../../include/mbedtls/mbedtls_config.h)
|
||||
for more information.
|
||||
|
||||
Status
|
||||
|
@@ -15,7 +15,7 @@ The present document proposes a way for an application using the PSA cryptograph
|
||||
|
||||
### Conditional inclusion of legacy cryptography modules
|
||||
|
||||
Mbed TLS offers a way to select which cryptographic mechanisms are included in a build through its configuration file (`config.h`). This mechanism is based on two main sets of symbols: `MBEDTLS_xxx_C` controls the availability of the mechanism to the application, and `MBEDTLS_xxx_ALT` controls the availability of an alternative implementation, so the software implementation is only included if `MBEDTLS_xxx_C` is defined but not `MBEDTLS_xxx_ALT`.
|
||||
Mbed TLS offers a way to select which cryptographic mechanisms are included in a build through its configuration file (`mbedtls_config.h`). This mechanism is based on two main sets of symbols: `MBEDTLS_xxx_C` controls the availability of the mechanism to the application, and `MBEDTLS_xxx_ALT` controls the availability of an alternative implementation, so the software implementation is only included if `MBEDTLS_xxx_C` is defined but not `MBEDTLS_xxx_ALT`.
|
||||
|
||||
### PSA evolution
|
||||
|
||||
@@ -51,10 +51,10 @@ The current model is difficult to adapt to the PSA interface for several reasons
|
||||
|
||||
The PSA Crypto configuration file `psa/crypto_config.h` defines a series of symbols of the form `PSA_WANT_xxx` where `xxx` describes the feature that the symbol enables. The symbols are documented in the section [“PSA Crypto configuration symbols”](#psa-crypto-configuration-symbols) below.
|
||||
|
||||
The symbol `MBEDTLS_PSA_CRYPTO_CONFIG` in `mbedtls/config.h` determines whether `psa/crypto_config.h` is used.
|
||||
The symbol `MBEDTLS_PSA_CRYPTO_CONFIG` in `mbedtls/mbedtls_config.h` determines whether `psa/crypto_config.h` is used.
|
||||
|
||||
* If `MBEDTLS_PSA_CRYPTO_CONFIG` is unset, which is the default at least in Mbed TLS 2.x versions, things are as they are today: the PSA subsystem includes generic code unconditionally, and includes support for specific mechanisms conditionally based on the existing `MBEDTLS_xxx_` symbols.
|
||||
* If `MBEDTLS_PSA_CRYPTO_CONFIG` is set, the necessary software implementations of cryptographic algorithms are included based on both the content of the PSA Crypto configuration file and the Mbed TLS configuration file. For example, the code in `aes.c` is enabled if either `mbedtls/config.h` contains `MBEDTLS_AES_C` or `psa/crypto_config.h` contains `PSA_WANT_KEY_TYPE_AES`.
|
||||
* If `MBEDTLS_PSA_CRYPTO_CONFIG` is set, the necessary software implementations of cryptographic algorithms are included based on both the content of the PSA Crypto configuration file and the Mbed TLS configuration file. For example, the code in `aes.c` is enabled if either `mbedtls/mbedtls_config.h` contains `MBEDTLS_AES_C` or `psa/crypto_config.h` contains `PSA_WANT_KEY_TYPE_AES`.
|
||||
|
||||
### PSA Crypto configuration symbols
|
||||
|
||||
@@ -123,17 +123,17 @@ These symbols are not part of the public interface of Mbed TLS towards applicati
|
||||
|
||||
#### New-style definition of configuration symbols
|
||||
|
||||
When `MBEDTLS_PSA_CRYPTO_CONFIG` is set, the header file `mbedtls/config.h` needs to define all the `MBEDTLS_xxx_C` configuration symbols, including the ones deduced from the PSA Crypto configuration. It does this by including the new header file **`mbedtls/config_psa.h`**, which defines the `MBEDTLS_PSA_BUILTIN_xxx` symbols and deduces the corresponding `MBEDTLS_xxx_C` (and other) symbols.
|
||||
When `MBEDTLS_PSA_CRYPTO_CONFIG` is set, the header file `mbedtls/mbedtls_config.h` needs to define all the `MBEDTLS_xxx_C` configuration symbols, including the ones deduced from the PSA Crypto configuration. It does this by including the new header file **`mbedtls/config_psa.h`**, which defines the `MBEDTLS_PSA_BUILTIN_xxx` symbols and deduces the corresponding `MBEDTLS_xxx_C` (and other) symbols.
|
||||
|
||||
`mbedtls/config_psa.h` includes `psa/crypto_config.h`, the user-editable file that defines application requirements.
|
||||
|
||||
#### Old-style definition of configuration symbols
|
||||
|
||||
When `MBEDTLS_PSA_CRYPTO_CONFIG` is not set, the configuration of Mbed TLS works as before, and the inclusion of non-PSA code only depends on `MBEDTLS_xxx` symbols defined (or not) in `mbedtls/config.h`. Furthermore, the new header file **`mbedtls/config_psa.h`** deduces PSA configuration symbols (`PSA_WANT_xxx`, `MBEDTLS_PSA_BUILTIN_xxx`) from classic configuration symbols (`MBEDTLS_xxx`).
|
||||
When `MBEDTLS_PSA_CRYPTO_CONFIG` is not set, the configuration of Mbed TLS works as before, and the inclusion of non-PSA code only depends on `MBEDTLS_xxx` symbols defined (or not) in `mbedtls/mbedtls_config.h`. Furthermore, the new header file **`mbedtls/config_psa.h`** deduces PSA configuration symbols (`PSA_WANT_xxx`, `MBEDTLS_PSA_BUILTIN_xxx`) from classic configuration symbols (`MBEDTLS_xxx`).
|
||||
|
||||
The `PSA_WANT_xxx` definitions in `mbedtls/config_psa.h` are needed not only to build the PSA parts of the library, but also to build code that uses these parts. This includes structure definitions in `psa/crypto_struct.h`, size calculations in `psa/crypto_sizes.h`, and application code that's specific to a given cryptographic mechanism. In Mbed TLS itself, code under `MBEDTLS_USE_PSA_CRYPTO` and conditional compilation guards in tests and sample programs need `PSA_WANT_xxx`.
|
||||
|
||||
Since some existing applications use a handwritten `mbedtls/config.h` or an edited copy of `mbedtls/config.h` from an earlier version of Mbed TLS, `mbedtls/config_psa.h` must be included via an already existing header that is not `mbedtls/config.h`, so it is included via `psa/crypto.h` (for example from `psa/crypto_platform.h`).
|
||||
Since some existing applications use a handwritten `mbedtls/mbedtls_config.h` or an edited copy of `mbedtls/mbedtls_config.h` from an earlier version of Mbed TLS, `mbedtls/config_psa.h` must be included via an already existing header that is not `mbedtls/mbedtls_config.h`, so it is included via `psa/crypto.h` (for example from `psa/crypto_platform.h`).
|
||||
|
||||
#### Summary of definitions of configuration symbols
|
||||
|
||||
@@ -147,7 +147,7 @@ The following table summarizes where symbols are defined depending on the config
|
||||
|
||||
| Symbols | With `MBEDTLS_PSA_CRYPTO_CONFIG` | Without `MBEDTLS_PSA_CRYPTO_CONFIG` |
|
||||
| ------------------------- | -------------------------------- | ----------------------------------- |
|
||||
| `MBEDTLS_xxx_C` | `mbedtls/config.h` (U) or | `mbedtls/config.h` (U) |
|
||||
| `MBEDTLS_xxx_C` | `mbedtls/mbedtls_config.h` (U) or | `mbedtls/mbedtls_config.h` (U) |
|
||||
| | `mbedtls/config_psa.h` (D) | |
|
||||
| `PSA_WANT_xxx` | `psa/crypto_config.h` (U) | `mbedtls/config_psa.h` (D) |
|
||||
| `MBEDTLS_PSA_BUILTIN_xxx` | `mbedtls/config_psa.h` (D) | `mbedtls/config_psa.h` (D) |
|
||||
|
Reference in New Issue
Block a user