Guard the tinycrypt code with MBEDTLS_USE_TINYCRYPT

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2020-10-14 12:02:40 +02:00
parent 8b2014bdb6
commit 7e62c31097
No known key found for this signature in database
GPG Key ID: 89A90840DC388527
3 changed files with 6 additions and 0 deletions

View File

@ -63,6 +63,7 @@
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_USE_TINYCRYPT)
#include <tinycrypt/ecc.h>
#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 */

View File

@ -66,6 +66,7 @@
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_USE_TINYCRYPT)
#include <tinycrypt/ecc.h>
#include <tinycrypt/ecc_dh.h>
#include <string.h>
@ -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 */

View File

@ -64,6 +64,7 @@
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_USE_TINYCRYPT)
#include <tinycrypt/ecc.h>
#include <tinycrypt/ecc_dsa.h>
#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 */