Commit 1dcc73b0 authored by Roman Okhrimenko's avatar Roman Okhrimenko Committed by Fabio Utzig
Browse files

Add ifdefs in crypto abstract function for ec256 to enable compilation when mbedtls used as backend

parent 6a8dbbad
Loading
Loading
Loading
Loading
+2 −1
Changes for boot/bootutil/include/bootutil/crypto/ecdsa_p256.h: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@
#include "mcuboot_config/mcuboot_config.h"

#if (defined(MCUBOOT_USE_TINYCRYPT) + \
     defined(MCUBOOT_USE_CC310)) != 1
     defined(MCUBOOT_USE_CC310) + \
     defined(MCUBOOT_USE_MBED_TLS)) != 1
    #error "One crypto backend must be defined: either CC310 or TINYCRYPT"
#endif

+3 −0
Changes for boot/bootutil/src/image_ec256.c: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@
#include "mcuboot_config/mcuboot_config.h"

#ifdef MCUBOOT_SIGN_EC256
/*TODO: remove this after cypress port mbedtls to abstract crypto api */
#if defined (MCUBOOT_USE_TINYCRYPT) || defined (MCUBOOT_USE_CC310)
#include "bootutil/sign_key.h"

#include "mbedtls/oid.h"
@@ -182,4 +184,5 @@ bootutil_verify_sig(uint8_t *hash, uint32_t hlen, uint8_t *sig, size_t slen,
    return rc;
}

#endif /* MCUBOOT_USE_TINYCRYPT || defined MCUBOOT_USE_CC310 */
#endif /* MCUBOOT_SIGN_EC256 */