diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c index cfc527b2f..6c944d33f 100644 --- a/tinycrypt/ecc.c +++ b/tinycrypt/ecc.c @@ -63,6 +63,7 @@ #include MBEDTLS_CONFIG_FILE #endif +#if defined(MBEDTLS_USE_TINYCRYPT) #include #include "mbedtls/platform_util.h" #include "mbedtls/sha256.h" @@ -1853,3 +1854,4 @@ int uECC_compute_public_key(const uint8_t *private_key, uint8_t *public_key) return ret; } +#endif /* MBEDTLS_USE_TINYCRYPT */ diff --git a/tinycrypt/ecc_dh.c b/tinycrypt/ecc_dh.c index 6285cf357..b6b1898d3 100644 --- a/tinycrypt/ecc_dh.c +++ b/tinycrypt/ecc_dh.c @@ -66,6 +66,7 @@ #include MBEDTLS_CONFIG_FILE #endif +#if defined(MBEDTLS_USE_TINYCRYPT) #include #include #include @@ -195,3 +196,4 @@ int uECC_shared_secret(const uint8_t *public_key, const uint8_t *private_key, return UECC_FAULT_DETECTED; } +#endif /* MBEDTLS_USE_TINYCRYPT */ diff --git a/tinycrypt/ecc_dsa.c b/tinycrypt/ecc_dsa.c index d432a2e6a..fe3952c2d 100644 --- a/tinycrypt/ecc_dsa.c +++ b/tinycrypt/ecc_dsa.c @@ -64,6 +64,7 @@ #include MBEDTLS_CONFIG_FILE #endif +#if defined(MBEDTLS_USE_TINYCRYPT) #include #include #include "mbedtls/platform_util.h" @@ -314,3 +315,4 @@ int uECC_verify(const uint8_t *public_key, const uint8_t *message_hash, return UECC_FAILURE; } +#endif /* MBEDTLS_USE_TINYCRYPT */