Marti Bolivar | a4818a5 | 2018-04-12 13:02:38 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2018 Open Source Foundries Limited |
| 3 | * SPDX-License-Identifier: Apache-2.0 |
| 4 | */ |
| 5 | |
| 6 | #ifndef _MCUBOOT_MBEDTLS_CONFIG_ |
| 7 | #define _MCUBOOT_MBEDTLS_CONFIG_ |
| 8 | |
| 9 | /** |
| 10 | * @file |
| 11 | * |
| 12 | * This is the top-level mbedTLS configuration file for MCUboot. The |
| 13 | * configuration depends on the signature type, so this file just |
| 14 | * pulls in the right header depending on that setting. |
| 15 | */ |
| 16 | |
| 17 | /* |
| 18 | * IMPORTANT: |
| 19 | * |
| 20 | * If you put any "generic" definitions in here, make sure to update |
| 21 | * the simulator build.rs accordingly. |
| 22 | */ |
| 23 | |
Fabio Utzig | 4541b53 | 2018-12-17 09:17:15 -0200 | [diff] [blame] | 24 | #if defined(CONFIG_BOOT_SIGNATURE_TYPE_RSA) || defined(CONFIG_BOOT_ENCRYPT_RSA) |
Marti Bolivar | a4818a5 | 2018-04-12 13:02:38 -0400 | [diff] [blame] | 25 | #include "config-rsa.h" |
Fabio Utzig | b6f014c | 2020-04-02 13:25:01 -0300 | [diff] [blame] | 26 | #elif defined(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256) || \ |
| 27 | defined(CONFIG_BOOT_ENCRYPT_EC256) || \ |
| 28 | (defined(CONFIG_BOOT_ENCRYPT_X25519) && !defined(CONFIG_BOOT_SIGNATURE_TYPE_ED25519)) |
Marti Bolivar | a4818a5 | 2018-04-12 13:02:38 -0400 | [diff] [blame] | 29 | #include "config-asn1.h" |
Fabio Utzig | 1171df9 | 2019-05-10 19:26:38 -0300 | [diff] [blame] | 30 | #elif defined(CONFIG_BOOT_SIGNATURE_TYPE_ED25519) |
| 31 | #include "config-ed25519.h" |
Marti Bolivar | a4818a5 | 2018-04-12 13:02:38 -0400 | [diff] [blame] | 32 | #else |
| 33 | #error "Cannot configure mbedTLS; signature type is unknown." |
| 34 | #endif |
| 35 | |
| 36 | #endif |