1 /*
2  * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
3  * Copyright (c) 2017 Intel Corporation.
4  *
5  * SPDX-License-Identifier: Apache-2.0
6  *
7  * Minimal configuration for TLS 1.2 (RFC 5246) for Zephyr, implementing only
8  * a few of the most popular ciphersuites.
9  */
10 
11 #ifndef MBEDTLS_CONFIG_H
12 #define MBEDTLS_CONFIG_H
13 
14 /* System support */
15 #define MBEDTLS_PLATFORM_C
16 #define MBEDTLS_PLATFORM_MEMORY
17 #define MBEDTLS_MEMORY_BUFFER_ALLOC_C
18 #define MBEDTLS_MEMORY_ALIGN_MULTIPLE (sizeof(void *))
19 #define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
20 #define MBEDTLS_PLATFORM_EXIT_ALT
21 #define MBEDTLS_NO_PLATFORM_ENTROPY
22 #define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
23 #define MBEDTLS_PLATFORM_PRINTF_ALT
24 #define MBEDTLS_PLATFORM_SNPRINTF_ALT
25 
26 #if !defined(CONFIG_ARM)
27 #define MBEDTLS_HAVE_ASM
28 #endif
29 
30 #if defined(CONFIG_MBEDTLS_TEST)
31 #define MBEDTLS_SELF_TEST
32 #define MBEDTLS_DEBUG_C
33 #else
34 #define MBEDTLS_ENTROPY_C
35 #endif
36 
37 /* mbed TLS feature support */
38 #define MBEDTLS_CIPHER_MODE_CBC
39 #define MBEDTLS_PKCS1_V15
40 #define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
41 #define MBEDTLS_SSL_PROTO_TLS1_2
42 
43 /* mbed TLS modules */
44 #define MBEDTLS_AES_C
45 #define MBEDTLS_ASN1_PARSE_C
46 #define MBEDTLS_ASN1_WRITE_C
47 #define MBEDTLS_BIGNUM_C
48 #define MBEDTLS_CIPHER_C
49 #define MBEDTLS_CTR_DRBG_C
50 #define MBEDTLS_DES_C
51 #define MBEDTLS_ENTROPY_C
52 #define MBEDTLS_MD_C
53 #define MBEDTLS_MD5_C
54 #define MBEDTLS_OID_C
55 #define MBEDTLS_PK_C
56 #define MBEDTLS_PK_PARSE_C
57 #define MBEDTLS_RSA_C
58 #define MBEDTLS_SHA1_C
59 #define MBEDTLS_SHA224_C
60 #define MBEDTLS_SHA256_C
61 #define MBEDTLS_SSL_CLI_C
62 #define MBEDTLS_SSL_SRV_C
63 #define MBEDTLS_SSL_TLS_C
64 #define MBEDTLS_X509_CRT_PARSE_C
65 #define MBEDTLS_X509_USE_C
66 
67 /* For test certificates */
68 #define MBEDTLS_BASE64_C
69 #define MBEDTLS_CERTS_C
70 
71 #if defined(CONFIG_MBEDTLS_DEBUG)
72 #define MBEDTLS_ERROR_C
73 #define MBEDTLS_DEBUG_C
74 #define MBEDTLS_SSL_DEBUG_ALL
75 #define MBEDTLS_SSL_ALL_ALERT_MESSAGES
76 #endif
77 
78 #define MBEDTLS_SSL_MAX_CONTENT_LEN  CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN
79 
80 #include "mbedtls/check_config.h"
81 
82 #endif /* MBEDTLS_CONFIG_H */
83