bootutil: ecdsa: Fix CC310 for nRF devices
This contains fixes for CC310 for nRF devices using the nrfxlib. Removed some const for compilation warnings and added `NUM_ECC_BYTES` define. Signed-off-by: Sigvart Hovland <sigvart.m@gmail.com>
This commit is contained in:
parent
c0dbdd407c
commit
59f1d29c0c
|
@ -69,7 +69,7 @@ static inline void bootutil_ecdsa_p256_drop(bootutil_ecdsa_p256_context *ctx)
|
|||
(void)ctx;
|
||||
}
|
||||
|
||||
static inline int bootutil_ecdsa_p256_verify(bootutil_ecdsa_p256_context *ctx, const uint8_t *pk, const uint8_t *hash, const uint8_t *sig)
|
||||
static inline int bootutil_ecdsa_p256_verify(bootutil_ecdsa_p256_context *ctx, uint8_t *pk, uint8_t *hash, uint8_t *sig)
|
||||
{
|
||||
(void)ctx;
|
||||
return cc310_ecdsa_verify_secp256r1(hash, pk, sig, BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE);
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
|
||||
#ifdef MCUBOOT_SIGN_EC256
|
||||
/*TODO: remove this after cypress port mbedtls to abstract crypto api */
|
||||
#ifdef MCUBOOT_USE_CC310
|
||||
#define NUM_ECC_BYTES (256 / 8)
|
||||
#endif
|
||||
#if defined (MCUBOOT_USE_TINYCRYPT) || defined (MCUBOOT_USE_CC310)
|
||||
#include "bootutil/sign_key.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y
|
||||
CONFIG_BOOT_ECDSA_CC310=y
|
Loading…
Reference in New Issue