From 46132207f83a79916c2cd7b7521620bfa06211db Mon Sep 17 00:00:00 2001 From: Jarno Lamsa Date: Mon, 29 Apr 2019 14:29:52 +0300 Subject: [PATCH] Make compiler happy when MBEDTLS_USE_UECC disabled --- tinycrypt/ecc.c | 3 ++- tinycrypt/ecc_dh.c | 2 ++ tinycrypt/ecc_dsa.c | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c index c4a677070..090f691e9 100644 --- a/tinycrypt/ecc.c +++ b/tinycrypt/ecc.c @@ -937,6 +937,7 @@ int uECC_compute_public_key(const uint8_t *private_key, uint8_t *public_key, curve->num_bytes, curve->num_bytes, _public + curve->num_words); return 1; } - +#else +typedef int mbedtls_dummy_uecc_def; #endif /* MBEDTLS_USE_UECC */ diff --git a/tinycrypt/ecc_dh.c b/tinycrypt/ecc_dh.c index 7277879be..5d0a52f77 100644 --- a/tinycrypt/ecc_dh.c +++ b/tinycrypt/ecc_dh.c @@ -196,4 +196,6 @@ clear_and_out: return r; } +#else +typedef int mbedtls_dummy_uecc_def; #endif /* MBEDTLS_USE_UECC */ diff --git a/tinycrypt/ecc_dsa.c b/tinycrypt/ecc_dsa.c index d3e72a57d..ff8a78a3a 100644 --- a/tinycrypt/ecc_dsa.c +++ b/tinycrypt/ecc_dsa.c @@ -292,5 +292,6 @@ int uECC_verify(const uint8_t *public_key, const uint8_t *message_hash, /* Accept only if v == r. */ return (int)(uECC_vli_equal(rx, r, num_words) == 0); } - +#else +typedef int mbedtls_dummy_uecc_def; #endif /* MBEDTLS_USE_UECC */