Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 1 | /* |
dp-arm | 52b1fe5 | 2017-03-07 10:08:42 +0000 | [diff] [blame] | 2 | * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved. |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame^] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 5 | */ |
6 | #ifndef __MBEDTLS_CONFIG_H__ | ||||
7 | #define __MBEDTLS_CONFIG_H__ | ||||
8 | |||||
9 | /* | ||||
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 10 | * Key algorithms currently supported on mbed TLS libraries |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 11 | */ |
dp-arm | 52b1fe5 | 2017-03-07 10:08:42 +0000 | [diff] [blame] | 12 | #define TBBR_RSA 1 |
13 | #define TBBR_ECDSA 2 | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 14 | |
15 | /* | ||||
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 16 | * Configuration file to build mbed TLS with the required features for |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 17 | * Trusted Boot |
18 | */ | ||||
19 | |||||
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 20 | #define MBEDTLS_PLATFORM_MEMORY |
21 | #define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 22 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 23 | #define MBEDTLS_PKCS1_V15 |
24 | #define MBEDTLS_PKCS1_V21 | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 25 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 26 | #define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION |
27 | #define MBEDTLS_X509_CHECK_KEY_USAGE | ||||
28 | #define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 29 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 30 | #define MBEDTLS_ASN1_PARSE_C |
31 | #define MBEDTLS_ASN1_WRITE_C | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 32 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 33 | #define MBEDTLS_BASE64_C |
34 | #define MBEDTLS_BIGNUM_C | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 35 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 36 | #define MBEDTLS_ERROR_C |
37 | #define MBEDTLS_MD_C | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 38 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 39 | #define MBEDTLS_MEMORY_BUFFER_ALLOC_C |
40 | #define MBEDTLS_OID_C | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 41 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 42 | #define MBEDTLS_PK_C |
43 | #define MBEDTLS_PK_PARSE_C | ||||
44 | #define MBEDTLS_PK_WRITE_C | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 45 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 46 | #define MBEDTLS_PLATFORM_C |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 47 | |
dp-arm | 52b1fe5 | 2017-03-07 10:08:42 +0000 | [diff] [blame] | 48 | #if (TBBR_KEY_ALG_ID == TBBR_ECDSA) |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 49 | #define MBEDTLS_ECDSA_C |
50 | #define MBEDTLS_ECP_C | ||||
51 | #define MBEDTLS_ECP_DP_SECP256R1_ENABLED | ||||
dp-arm | 52b1fe5 | 2017-03-07 10:08:42 +0000 | [diff] [blame] | 52 | #elif (TBBR_KEY_ALG_ID == TBBR_RSA) |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 53 | #define MBEDTLS_RSA_C |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 54 | #endif |
55 | |||||
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 56 | #define MBEDTLS_SHA256_C |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 57 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 58 | #define MBEDTLS_VERSION_C |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 59 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 60 | #define MBEDTLS_X509_USE_C |
61 | #define MBEDTLS_X509_CRT_PARSE_C | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 62 | |
63 | /* MPI / BIGNUM options */ | ||||
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 64 | #define MBEDTLS_MPI_WINDOW_SIZE 2 |
65 | #define MBEDTLS_MPI_MAX_SIZE 256 | ||||
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 66 | |
67 | /* Memory buffer allocator options */ | ||||
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 68 | #define MBEDTLS_MEMORY_ALIGN_MULTIPLE 8 |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 69 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 70 | #include "mbedtls/check_config.h" |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 71 | |
Juan Castillo | bae6b2a | 2015-11-05 09:24:53 +0000 | [diff] [blame] | 72 | /* System headers required to build mbed TLS with the current configuration */ |
Juan Castillo | a57a4d5 | 2015-04-02 15:44:20 +0100 | [diff] [blame] | 73 | #include <stdlib.h> |
74 | |||||
75 | #endif /* __MBEDTLS_CONFIG_H__ */ |