Skip to content

Commit

Permalink
mbedtls config: fix too early check_config.h includes
Browse files Browse the repository at this point in the history
check_config.h was included manually by custom configuration files.
This caused compilation errors when updating MbedTLS to 3.6.0
because check_config.h was processed too early, before the whole
configuration is defined, effectively causing configuration check errors.

MbedTLS already takes care of including check_config.h at the right time.
Remove those erroneous manual check_config.h includes.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
  • Loading branch information
tomi-font authored and nvlsianpu committed Apr 25, 2024
1 parent 78bfe75 commit d4394c2
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#ifdef FIH_ENABLE_DELAY

#include "mcuboot-mbedtls-cfg.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/entropy.h"

Expand Down
2 changes: 0 additions & 2 deletions boot/cypress/MCUBootApp/config/mcuboot_crypto_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3596,8 +3596,6 @@
#include MBEDTLS_USER_CONFIG_FILE
#endif

#include "mbedtls/check_config.h"

#ifdef MCUBOOT_ENC_IMAGES
#define MBEDTLS_SHA256_DIGEST_SIZE (32)
#define MBEDTLS_AES_KEY_SIZE 16
Expand Down
2 changes: 0 additions & 2 deletions boot/zephyr/include/config-asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,4 @@
// #define MBEDTLS_OID_C
// #define MBEDTLS_SHA256_C

#include "mbedtls/check_config.h"

#endif /* MBEDTLS_CONFIG_ASN1_H */
2 changes: 0 additions & 2 deletions boot/zephyr/include/config-ec.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,4 @@
#define MBEDTLS_NIST_KW_C
#endif /* MCUBOOT_ENC_IMAGES */

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_ECDSA */
2 changes: 0 additions & 2 deletions boot/zephyr/include/config-ed25519.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,4 @@
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_RSA */
2 changes: 0 additions & 2 deletions boot/zephyr/include/config-kw.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,4 @@
#define MBEDTLS_CIPHER_C
#define MBEDTLS_NIST_KW_C

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_KW */
2 changes: 0 additions & 2 deletions boot/zephyr/include/config-rsa-kw.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,4 @@
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_RSA_KW */
2 changes: 0 additions & 2 deletions boot/zephyr/include/config-rsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,4 @@
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_RSA */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,4 @@
// #define MBEDTLS_OID_C
// #define MBEDTLS_SHA256_C

#include "mbedtls/check_config.h"

#endif /* MBEDTLS_CONFIG_ASN1_H */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-ec-psa.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,4 @@
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
#endif /* MCUBOOT_SIGN_EC384 */

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_PSA_CRYPTO_CONFIG_ECDSA */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-ec.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,4 @@
#define MBEDTLS_NIST_KW_C
#endif /* MCUBOOT_ENC_IMAGES */

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_ECDSA */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-ed25519.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,4 @@
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_RSA */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-kw.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,4 @@
#define MBEDTLS_CIPHER_C
#define MBEDTLS_NIST_KW_C

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_KW */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-rsa-kw.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,4 @@
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_RSA_KW */
2 changes: 0 additions & 2 deletions sim/mcuboot-sys/csupport/config-rsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,4 @@
/* Save ROM and a few bytes of RAM by specifying our own ciphersuite list */
#define MBEDTLS_SSL_CIPHERSUITES MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8

#include "mbedtls/check_config.h"

#endif /* MCUBOOT_MBEDTLS_CONFIG_RSA */

0 comments on commit d4394c2

Please sign in to comment.