From 36ae758798e0b96365fdd1fbad159cf3dab9817b Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Tue, 23 Jul 2019 15:52:35 +0100 Subject: [PATCH] Include Mbed TLS config in tinycrypt compilation units --- tinycrypt/ecc.c | 6 ++++++ tinycrypt/ecc_dh.c | 7 +++++++ tinycrypt/ecc_dsa.c | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c index 2e694cc10..ab1956a50 100644 --- a/tinycrypt/ecc.c +++ b/tinycrypt/ecc.c @@ -52,6 +52,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + #if defined(MBEDTLS_USE_TINYCRYPT) #include #include diff --git a/tinycrypt/ecc_dh.c b/tinycrypt/ecc_dh.c index 28dfdf9eb..8aae1a214 100644 --- a/tinycrypt/ecc_dh.c +++ b/tinycrypt/ecc_dh.c @@ -54,6 +54,13 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ + +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + #if defined(MBEDTLS_USE_TINYCRYPT) #include #include diff --git a/tinycrypt/ecc_dsa.c b/tinycrypt/ecc_dsa.c index 048fa6125..374309191 100644 --- a/tinycrypt/ecc_dsa.c +++ b/tinycrypt/ecc_dsa.c @@ -53,6 +53,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + #if defined(MBEDTLS_USE_TINYCRYPT) #include #include