bootutil/crypto: Move BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE into common
BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE is a universal define that should be moved into a common area of the header instead of repeating it for every abstraction that needs it Signed-off-by: Antonio de Angelis <Antonio.deAngelis@arm.com> Change-Id: I21e7511218d0dafac8b7337715932c6564d7c3a1
This commit is contained in:
parent
88e4aed18f
commit
0a1ef37263
|
@ -41,12 +41,10 @@
|
|||
#if defined(MCUBOOT_USE_TINYCRYPT)
|
||||
#include <tinycrypt/ecc_dsa.h>
|
||||
#include <tinycrypt/constants.h>
|
||||
#define BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE (4 * 8)
|
||||
#endif /* MCUBOOT_USE_TINYCRYPT */
|
||||
|
||||
#if defined(MCUBOOT_USE_CC310)
|
||||
#include <cc310_glue.h>
|
||||
#define BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE (4 * 8)
|
||||
#endif /* MCUBOOT_USE_CC310 */
|
||||
|
||||
#if defined(MCUBOOT_USE_PSA_CRYPTO)
|
||||
|
@ -54,7 +52,6 @@
|
|||
#include <string.h>
|
||||
#elif defined(MCUBOOT_USE_MBED_TLS)
|
||||
#include <mbedtls/ecdsa.h>
|
||||
#define BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE (4 * 8)
|
||||
/* Indicate to the caller that the verify function needs the raw ASN.1
|
||||
* signature, not a decoded one. */
|
||||
#define MCUBOOT_ECDSA_NEED_ASN1_SIG
|
||||
|
@ -65,6 +62,9 @@
|
|||
#define NUM_ECC_BYTES (256 / 8)
|
||||
#endif
|
||||
|
||||
/* Universal defines */
|
||||
#define BOOTUTIL_CRYPTO_ECDSA_P256_HASH_SIZE (32)
|
||||
|
||||
#include "mbedtls/oid.h"
|
||||
#include "mbedtls/asn1.h"
|
||||
#include "bootutil/sign_key.h"
|
||||
|
|
Loading…
Reference in New Issue