-
Notifications
You must be signed in to change notification settings - Fork 742
/
Copy pathmcuboot-mbedtls-cfg.h
37 lines (32 loc) · 1022 Bytes
/
mcuboot-mbedtls-cfg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Copyright (C) 2018 Open Source Foundries Limited
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef _MCUBOOT_MBEDTLS_CONFIG_
#define _MCUBOOT_MBEDTLS_CONFIG_
/**
* @file
*
* This is the top-level mbedTLS configuration file for MCUboot. The
* configuration depends on the signature type, so this file just
* pulls in the right header depending on that setting.
*/
/*
* IMPORTANT:
*
* If you put any "generic" definitions in here, make sure to update
* the simulator build.rs accordingly.
*/
#if defined(CONFIG_BOOT_SIGNATURE_TYPE_RSA) || defined(CONFIG_BOOT_ENCRYPT_RSA)
#include "config-rsa.h"
#elif defined(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256) || \
defined(CONFIG_BOOT_ENCRYPT_EC256) || \
(defined(CONFIG_BOOT_ENCRYPT_X25519) && !defined(CONFIG_BOOT_SIGNATURE_TYPE_ED25519))
#include "config-asn1.h"
#include "config-ec.h"
#elif defined(CONFIG_BOOT_SIGNATURE_TYPE_ED25519)
#include "config-ed25519.h"
#else
#error "Cannot configure mbedTLS; signature type is unknown."
#endif
#endif