diff --git a/tf-psa-crypto/drivers/builtin/include/mbedtls/config_adjust_test_accelerators.h b/tf-psa-crypto/drivers/builtin/include/mbedtls/config_adjust_test_accelerators.h index 7b50936dc7..5f25879780 100644 --- a/tf-psa-crypto/drivers/builtin/include/mbedtls/config_adjust_test_accelerators.h +++ b/tf-psa-crypto/drivers/builtin/include/mbedtls/config_adjust_test_accelerators.h @@ -38,6 +38,14 @@ #ifndef MBEDTLS_CONFIG_ADJUST_TEST_ACCELERATORS_H #define MBEDTLS_CONFIG_ADJUST_TEST_ACCELERATORS_H +#if !defined(MBEDTLS_CONFIG_FILES_READ) +#error "Do not include mbedtls/config_adjust_*.h manually! This can lead to problems, " \ + "up to and including runtime errors such as buffer overflows. " \ + "If you're trying to fix a complaint from check_config.h, just remove " \ + "it from your configuration file: since Mbed TLS 3.0, it is included " \ + "automatically at the right point." +#endif + #if defined(PSA_CRYPTO_DRIVER_TEST_ALL) /* PSA_CRYPTO_DRIVER_TEST_ALL activates test drivers while keeping the * built-in implementations active. Normally setting MBEDTLS_PSA_ACCEL_xxx